From c710a39b9e95afdbc0b950552c11e928a5997024 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Wed, 30 Jan 2013 23:53:23 +0100 Subject: [PATCH 1/4] Resolved merge conflict From 58c1ba89940ba3eeb7124a4ced8cf3bb962f2e15 Mon Sep 17 00:00:00 2001 From: John Muehlhausen Date: Sat, 27 Oct 2012 15:51:03 -0500 Subject: [PATCH 2/4] patch for issue 456 Do not filter out duplicate subscriptions on the XSUB side of XSUB/XPUB, so that ZMQ_XPUB_VERBOSE doesn't get blocked by forwarding devices (as long as the devices all use ZMQ_XPUB_VERBOSE) --- src/xsub.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/xsub.cpp b/src/xsub.cpp index d41e31b1..96bcc0ca 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -95,7 +95,13 @@ int zmq::xsub_t::xsend (msg_t *msg_, int flags_) // Process the subscription. if (*data == 1) { - if (subscriptions.add (data + 1, size - 1)) + // this used to filter out duplicate subscriptions, + // however this is alread done on the XPUB side and + // doing it here as well breaks ZMQ_XPUB_VERBOSE + // when there are forwarding devices involved + // + //if (subscriptions.add (data + 1, size - 1)) + subscriptions.add (data + 1, size - 1); return dist.send_to_all (msg_, flags_); } else { From a3dafd408ff35085a36820bfbd1926f0d89a8296 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Sun, 28 Oct 2012 07:36:18 +0900 Subject: [PATCH 3/4] Code formatting --- src/xsub.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/xsub.cpp b/src/xsub.cpp index 96bcc0ca..7f5f6fdc 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -99,10 +99,8 @@ int zmq::xsub_t::xsend (msg_t *msg_, int flags_) // however this is alread done on the XPUB side and // doing it here as well breaks ZMQ_XPUB_VERBOSE // when there are forwarding devices involved - // - //if (subscriptions.add (data + 1, size - 1)) - subscriptions.add (data + 1, size - 1); - return dist.send_to_all (msg_, flags_); + subscriptions.add (data + 1, size - 1); + return dist.send_to_all (msg_, flags_); } else { if (subscriptions.rm (data + 1, size - 1)) From 11bae19cf8596320d2f51fe430ee3cafdecb659c Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Thu, 2 May 2013 22:10:06 +0200 Subject: [PATCH 4/4] #456 was not in 3.2.2 but will be in 3.2.4 --- NEWS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 748befbc..a01a7096 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +0MQ version 3.2.4 stable, released on 2013/xx/xx +================================================ + +* LIBZMQ-456 ZMQ_XPUB_VERBOSE does not propagate in a tree of XPUB/XSUB devices + + 0MQ version 3.2.3 stable, released on 2013/05/02 ================================================ @@ -29,7 +35,6 @@ Issues addressed in this release * LIBZMQ-450 lt-test_monitor: fails with assertion at test_monitor.cpp:81 * LIBZMQ-451 ZMQ_ROUTER_MANDATORY blocks forever * LIBZMQ-452 test_connect_delay.cpp:175:12: error: 'sleep' was not declared in this scope -* LIBZMQ-456 ZMQ_XPUB_VERBOSE does not propagate in a tree of XPUB/XSUB devices * LIBZMQ-458 lt-test_router_mandatory fails with assertion at test_router_mandatory.cpp:53 * LIBZMQ-459 Assertion failed: encoder (stream_engine.cpp:266 * LIBZMQ-464 PUB socket with HWM set leaks memory