mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-22 15:07:28 +01:00
Merge pull request #284 from pieterh/master
Fixed issue LIBZMQ-344 - Implementation of ZMQ_FAIL_UNROUTABLE is broken
This commit is contained in:
commit
84707d3feb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user