mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-22 16:02:31 +02: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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// Protocol is available.
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user