diff options
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r-- | src/socket_base.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 9412d67..0429726 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -125,14 +125,6 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_, options.swap = *((int64_t*) optval_); return 0; - case ZMQ_MASK: - if (optvallen_ != sizeof (int64_t)) { - errno = EINVAL; - return -1; - } - options.mask = (uint64_t) *((int64_t*) optval_); - return 0; - case ZMQ_AFFINITY: if (optvallen_ != sizeof (int64_t)) { errno = EINVAL; @@ -151,19 +143,19 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_, return -1; case ZMQ_RATE: - if (optvallen_ != sizeof (uint32_t)) { + if (optvallen_ != sizeof (int64_t)) { errno = EINVAL; return -1; } - options.rate = *((int32_t*) optval_); + options.rate = (uint32_t) *((int64_t*) optval_); return 0; case ZMQ_RECOVERY_IVL: - if (optvallen_ != sizeof (uint32_t)) { + if (optvallen_ != sizeof (int64_t)) { errno = EINVAL; return -1; } - options.recovery_ivl = *((int32_t*) optval_); + options.recovery_ivl = (uint32_t) *((int64_t*) optval_); return 0; default: |