Commit b32542e3 authored by Ian Barber's avatar Ian Barber

Merge pull request #403 from methodmissing/efault-zmq-poll

Revert zmq_poll NULL poll items check to 2.2 behavior - let the poll items count filter out empty poll sets and not return a sometimes unexpected EFAULT error status
parents 040d4d32 556074d4
......@@ -611,10 +611,6 @@ int zmq_msg_set (zmq_msg_t *msg_, int option_, int optval_)
int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
{
if (!items_) {
errno = EFAULT;
return -1;
}
#if defined ZMQ_POLL_BASED_ON_POLL
if (unlikely (nitems_ < 0)) {
errno = EINVAL;
......@@ -633,6 +629,12 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
return usleep (timeout_ * 1000);
#endif
}
if (!items_) {
errno = EFAULT;
return -1;
}
zmq::clock_t clock;
uint64_t now = 0;
uint64_t end = 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