From 72b2f07a707724b353e9733f60cb4bade9b43966 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 11 Jan 2010 07:47:19 +0100 Subject: [PATCH] ZMQII-36: Chat example & forwarder broken because of changes subscribe semantics --- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- examples/chat/display.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/zmq_forwarder/zmq_forwarder.cpp b/devices/zmq_forwarder/zmq_forwarder.cpp index 42d65b43..b9004841 100644 --- a/devices/zmq_forwarder/zmq_forwarder.cpp +++ b/devices/zmq_forwarder/zmq_forwarder.cpp @@ -54,7 +54,7 @@ int main (int argc, char *argv []) // TODO: make the number of I/O threads configurable. zmq::context_t ctx (1, 1); zmq::socket_t in_socket (ctx, ZMQ_SUB); - in_socket.setsockopt (ZMQ_SUBSCRIBE, "*", 1); + in_socket.setsockopt (ZMQ_SUBSCRIBE, "", 0); zmq::socket_t out_socket (ctx, ZMQ_PUB); int n = 0; diff --git a/examples/chat/display.cpp b/examples/chat/display.cpp index d3488a20..c6893521 100755 --- a/examples/chat/display.cpp +++ b/examples/chat/display.cpp @@ -36,7 +36,7 @@ int main (int argc, const char *argv []) // Initialise 0MQ infrastructure. zmq::context_t ctx (1, 1); zmq::socket_t s (ctx, ZMQ_SUB); - s.setsockopt (ZMQ_SUBSCRIBE, "*", 1); + s.setsockopt (ZMQ_SUBSCRIBE, "", 0); s.connect (address); while (true) {