From 0b59866a84f733e5a53b0d2f32570581691747ef Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 30 May 2011 10:07:34 +0200 Subject: Patches from sub-forward branch incorporated Signed-off-by: Martin Sustrik --- src/fq.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/fq.cpp') diff --git a/src/fq.cpp b/src/fq.cpp index 7318822..63a50ff 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -62,6 +62,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 (); @@ -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++; -- cgit v1.2.3