mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-14 23:07:59 +02:00
better naming of flags and variables to real functionality: nodrop
This commit is contained in:
@@ -90,7 +90,7 @@ void zmq::xpub_t::xwrite_activated (pipe_t *pipe_)
|
||||
int zmq::xpub_t::xsetsockopt (int option_, const void *optval_,
|
||||
size_t optvallen_)
|
||||
{
|
||||
if (option_ != ZMQ_XPUB_VERBOSE && option_ != ZMQ_XPUB_WAIT) {
|
||||
if (option_ != ZMQ_XPUB_VERBOSE && option_ != ZMQ_XPUB_NODROP) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
@@ -100,8 +100,8 @@ int zmq::xpub_t::xsetsockopt (int option_, const void *optval_,
|
||||
}
|
||||
if (option_ == ZMQ_XPUB_VERBOSE) {
|
||||
verbose = (*static_cast <const int*> (optval_) != 0);
|
||||
} else if (option_ == ZMQ_XPUB_WAIT) {
|
||||
wait = (*static_cast <const int*> (optval_) != 0);
|
||||
} else if (option_ == ZMQ_XPUB_NODROP) {
|
||||
nodrop = (*static_cast <const int*> (optval_) != 0);
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
@@ -135,7 +135,7 @@ int zmq::xpub_t::xsend (msg_t *msg_)
|
||||
subscriptions.match ((unsigned char*) msg_->data (), msg_->size (),
|
||||
mark_as_matching, this);
|
||||
|
||||
if (wait && !dist.check_hwm()) {
|
||||
if (nodrop && !dist.check_hwm()) {
|
||||
return EAGAIN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user