mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-26 18:42:43 +01:00
Problem: errno not set if UDP is NOT used with ZMQ_RADIO or ZMQ_DISH
Solution: set errno to ENOCOMPATPROTO in check_protocol()
This commit is contained in:
@@ -324,8 +324,11 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (protocol_ == "udp" && (options.type != ZMQ_DISH && options.type != ZMQ_RADIO))
|
if (protocol_ == "udp" && (options.type != ZMQ_DISH &&
|
||||||
|
options.type != ZMQ_RADIO)) {
|
||||||
|
errno = ENOCOMPATPROTO;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
// Protocol is available.
|
// Protocol is available.
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user