Merge pull request #85 from hintjens/master

Fix for #456 was not backported to 3.2.2; will be in 3.2.4 now
This commit is contained in:
Martin Hurton 2013-05-03 00:02:08 -07:00
commit 14bb2e46a5
2 changed files with 12 additions and 3 deletions

7
NEWS
View File

@ -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

View File

@ -95,8 +95,12 @@ int zmq::xsub_t::xsend (msg_t *msg_, int flags_)
// Process the subscription.
if (*data == 1) {
if (subscriptions.add (data + 1, size - 1))
return dist.send_to_all (msg_, flags_);
// 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
subscriptions.add (data + 1, size - 1);
return dist.send_to_all (msg_, flags_);
}
else {
if (subscriptions.rm (data + 1, size - 1))