From 91fdedf25c4d76b0ec0aeb5d1d9f1c9a1a769447 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 17 Dec 2011 10:14:32 +0100 Subject: Fix polling on XREP socket When polling on XREP socket in incoming message part was prefetched, but not the identity of sender. The problem is fixed by this patch. Signed-off-by: Martin Sustrik --- src/xrep.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/xrep.hpp') diff --git a/src/xrep.hpp b/src/xrep.hpp index df82d00..65bd564 100644 --- a/src/xrep.hpp +++ b/src/xrep.hpp @@ -67,8 +67,12 @@ namespace zmq // Fair queueing object for inbound pipes. fq_t fq; - // Have we prefetched a message. - bool prefetched; + // This value is either 0 (nothing is prefetched), 1 (only message body + // is prefetched) or 2 (both identity and message body are prefetched). + int prefetched; + + // Holds the prefetched identity. + blob_t prefetched_id; // Holds the prefetched message. msg_t prefetched_msg; -- cgit v1.2.3