Problem: code duplication in getsockopt/setsockopt

Solution: extracted common code into do_getsockopt/do_setsockopt functions
This commit is contained in:
Simon Giesecke
2018-03-06 11:16:22 +01:00
parent 494c2a71f8
commit 6f967c3a13
6 changed files with 264 additions and 256 deletions

View File

@@ -106,6 +106,8 @@ int zmq::router_t::xsetsockopt (int option_,
switch (option_) {
case ZMQ_CONNECT_ROUTING_ID:
// TODO why isn't it possible to set an empty connect_routing_id
// (which is the default value)
if (optval_ && optvallen_) {
connect_routing_id.assign ((char *) optval_, optvallen_);
return 0;