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:
hitstergtd
2016-04-15 01:17:17 +01:00
parent c2a1be5c15
commit 362377948e

View File

@@ -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;