diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-05-30 10:07:34 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-05-30 10:07:34 +0200 |
commit | 0b59866a84f733e5a53b0d2f32570581691747ef (patch) | |
tree | 8861d97915544dc4385177931f299a6f27603c92 /src/fq.cpp | |
parent | 311fb0d852374e769d8ff791c9df38f0464960c6 (diff) |
Patches from sub-forward branch incorporated
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/fq.cpp')
-rw-r--r-- | src/fq.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -63,6 +63,11 @@ void zmq::fq_t::activated (pipe_t *pipe_) int zmq::fq_t::recv (msg_t *msg_, int flags_) { + return recvpipe (msg_, flags_, NULL); +} + +int zmq::fq_t::recvpipe (msg_t *msg_, int flags_, pipe_t **pipe_) +{ // Deallocate old content of the message. int rc = msg_->close (); errno_assert (rc == 0); @@ -83,6 +88,8 @@ int zmq::fq_t::recv (msg_t *msg_, int flags_) // and replaced by another active pipe. Thus we don't have to increase // the 'current' pointer. if (fetched) { + if (pipe_) + *pipe_ = pipes [current]; more = msg_->flags () & msg_t::more; if (!more) { current++; |