better naming of flags and variables to real functionality: nodrop

This commit is contained in:
kreuzberger
2014-08-08 19:45:41 +02:00
parent d9a3cc48d4
commit f042ea9e26
7 changed files with 15 additions and 15 deletions

View File

@@ -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;
}