Commit 57c1342c authored by Martin Sustrik's avatar Martin Sustrik

Bug with setting options on SUB socket fixed

Signed-off-by: 's avatarMartin Sustrik <sustrik@250bpm.com>
parent 29274811
...@@ -38,6 +38,11 @@ zmq::sub_t::~sub_t () ...@@ -38,6 +38,11 @@ zmq::sub_t::~sub_t ()
int zmq::sub_t::xsetsockopt (int option_, const void *optval_, int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
size_t optvallen_) size_t optvallen_)
{ {
if (option_ != ZMQ_SUBSCRIBE && option_ != ZMQ_UNSUBSCRIBE) {
errno = EINVAL;
return -1;
}
// Create the subscription message. // Create the subscription message.
msg_t msg; msg_t msg;
int rc = msg.init_size (optvallen_ + 1); int rc = msg.init_size (optvallen_ + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment