Merge pull request #1897 from hitstergtd/udp-errno-fix

Problem: errno not set if UDP is NOT used with ZMQ_RADIO or ZMQ_DISH
This commit is contained in:
Joe Eli McIlvain 2016-04-14 17:29:18 -07:00
commit a670e81e73

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;