summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-24 18:30:48 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-24 18:30:48 +0200
commit43b5b3444c5ea54fa17eab2e03b7e00c022f33b4 (patch)
tree3957c794dd8ea86d5605e074eeeb844eb8746a22
parent7c1dca546d9e49e7af372e4fff9e6a87058a7f12 (diff)
PGM subscription forwarding fixed
PGM when using in XPUB socket has to subscribe for all the messages as it has no idea what the subscribers are interesred in. This generic subscribe message was malformed. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r--src/pgm_sender.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp
index d2419ea..79d4e32 100644
--- a/src/pgm_sender.cpp
+++ b/src/pgm_sender.cpp
@@ -94,7 +94,8 @@ void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, session_t *session_)
// what messages are peers interested in. Because of that we have to
// subscribe for all the messages.
msg_t msg;
- msg.init ();
+ msg.init_size (1);
+ *(unsigned char*) msg.data () = 1;
bool ok = session_->write (&msg);
zmq_assert (ok);
session_->flush ();