diff options
Diffstat (limited to 'src/sub.cpp')
-rw-r--r-- | src/sub.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sub.cpp b/src/sub.cpp index 79cb63c..d29ae8d 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -48,7 +48,8 @@ int xs::sub_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { if (option_ != XS_SUBSCRIBE && option_ != XS_UNSUBSCRIBE) { - return xsub_t::xsetsockopt (option_, optval_, optvallen_); + errno = EINVAL; + return -1; } if (optvallen_ > 0 && !optval_) { @@ -201,7 +202,7 @@ int xs::sub_t::filter_subscribed (const unsigned char *data_, size_t size_) int rc = msg.init_size (size_ + 4); errno_assert (rc == 0); unsigned char *data = (unsigned char*) msg.data (); - put_uint16 (data, SP_PUBSUB_CMD_SUBSCRIBE); + put_uint16 (data, XS_CMD_SUBSCRIBE); put_uint16 (data + 2, options.filter); memcpy (data + 4, data_, size_); @@ -224,7 +225,7 @@ int xs::sub_t::filter_unsubscribed (const unsigned char *data_, size_t size_) int rc = msg.init_size (size_ + 4); errno_assert (rc == 0); unsigned char *data = (unsigned char*) msg.data (); - put_uint16 (data, SP_PUBSUB_CMD_UNSUBSCRIBE); + put_uint16 (data, XS_CMD_UNSUBSCRIBE); put_uint16 (data + 2, options.filter); memcpy (data + 4, data_, size_); |