mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-03 12:58:05 +01:00
Bug with setting options on SUB socket fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
29274811cc
commit
57c1342c68
@ -38,6 +38,11 @@ zmq::sub_t::~sub_t ()
|
||||
int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
|
||||
size_t optvallen_)
|
||||
{
|
||||
if (option_ != ZMQ_SUBSCRIBE && option_ != ZMQ_UNSUBSCRIBE) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Create the subscription message.
|
||||
msg_t msg;
|
||||
int rc = msg.init_size (optvallen_ + 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user