summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/options.cpp5
-rw-r--r--src/options.hpp1
-rw-r--r--src/socket_base.cpp16
3 files changed, 6 insertions, 16 deletions
diff --git a/src/options.cpp b/src/options.cpp
index 804cb4f..a39d312 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -23,9 +23,8 @@ zmq::options_t::options_t () :
hwm (0),
lwm (0),
swap (0),
- mask (0),
affinity (0),
- rate (0),
- recovery_ivl (0)
+ rate (100),
+ recovery_ivl (10)
{
}
diff --git a/src/options.hpp b/src/options.hpp
index 9f4a264..4d359e3 100644
--- a/src/options.hpp
+++ b/src/options.hpp
@@ -34,7 +34,6 @@ namespace zmq
int64_t hwm;
int64_t lwm;
int64_t swap;
- uint64_t mask;
uint64_t affinity;
std::string identity;
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: