summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Buchanan <bwb@holo.org>2010-06-11 08:03:34 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-06-11 08:03:34 +0200
commitac90b7e0ba497bfec09d7a69a2e01dc6d94a9c9a (patch)
treeb37aa3124ad1e9eae3f8a0a8aaadc15b62e1b81f
parent5ee355d1880bc7391c199ea29adc620ceb0d96f1 (diff)
issue 35 - ZMQ_RCVMORE sometimes erroneously returns false
-rw-r--r--AUTHORS1
-rw-r--r--src/socket_base.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 0eba721..3538b1d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,6 +5,7 @@ Alexej Lotz <alexej.lotz@arcor.de>
Asko Kauppi <askok@dnainternet.net>
Barak Amar <barak.amar@gmail.com>
Bernd Prager <bernd@prager.ws>
+Brian Buchanan <bwb@holo.org>
Chris Wong <chris@chriswongstudio.com>
Conrad D. Steenberg <conrad.steenberg@caltech.edu>
Dhruva Krishnamurthy <dhruva@ymail.com>
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index eddb297..62a7465 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -424,7 +424,14 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
return -1;
}
ticks = 0;
- return xrecv (msg_, flags_);
+
+ rc = xrecv (msg_, flags_);
+ if (rc == 0) {
+ rcvmore = msg_->flags & ZMQ_MSG_MORE;
+ if (rcvmore)
+ msg_->flags &= ~ZMQ_MSG_MORE;
+ }
+ return rc;
}
// In blocking scenario, commands are processed over and over again until