Commit d61f067f authored by Martin Sustrik's avatar Martin Sustrik

ZMQ_EVENTS type changed to int

Signed-off-by: 's avatarMartin Sustrik <sustrik@250bpm.com>
parent 23bd3726
...@@ -316,7 +316,7 @@ the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case ...@@ -316,7 +316,7 @@ the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case
and restart their polling operation/event loop. and restart their polling operation/event loop.
[horizontal] [horizontal]
Option value type:: uint32_t Option value type:: int
Option value unit:: N/A (flags) Option value unit:: N/A (flags)
Default value:: N/A Default value:: N/A
Applicable socket types:: all Applicable socket types:: all
......
...@@ -264,7 +264,7 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_, ...@@ -264,7 +264,7 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_,
} }
if (option_ == ZMQ_EVENTS) { if (option_ == ZMQ_EVENTS) {
if (*optvallen_ < sizeof (uint32_t)) { if (*optvallen_ < sizeof (int)) {
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
...@@ -272,12 +272,12 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_, ...@@ -272,12 +272,12 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_,
if (rc != 0 && (errno == EINTR || errno == ETERM)) if (rc != 0 && (errno == EINTR || errno == ETERM))
return -1; return -1;
errno_assert (rc == 0); errno_assert (rc == 0);
*((uint32_t*) optval_) = 0; *((int*) optval_) = 0;
if (has_out ()) if (has_out ())
*((uint32_t*) optval_) |= ZMQ_POLLOUT; *((int*) optval_) |= ZMQ_POLLOUT;
if (has_in ()) if (has_in ())
*((uint32_t*) optval_) |= ZMQ_POLLIN; *((int*) optval_) |= ZMQ_POLLIN;
*optvallen_ = sizeof (uint32_t); *optvallen_ = sizeof (int);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment