Commit 84707d3f authored by Ian Barber's avatar Ian Barber

Merge pull request #284 from pieterh/master

Fixed issue LIBZMQ-344 - Implementation of ZMQ_FAIL_UNROUTABLE is broken
parents 8a64d80f 860e1d24
......@@ -85,14 +85,11 @@ int zmq::xrep_t::xsetsockopt (int option_, const void *optval_,
errno = EINVAL;
return -1;
}
if(sizeof(optvallen_) != sizeof(int)) {
if (optvallen_ != sizeof (int) || *((int*) optval_) < 0) {
errno = EINVAL;
return -1;
}
fail_unroutable = *((const int*) optval_);
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