summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-12-06 22:36:10 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-12-06 22:36:10 +0100
commitec61751e17fe4ceb62cc16750b12df6056c5962a (patch)
treed41a90740558b30fcb52a2457acb1577a39766ae
parent8a6ff4ccd2ecbbfb7b2fd80fe621b8a05b0f9bbd (diff)
options.type correctly set for PUB/SUB/XPUB/XSUB
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r--src/pub.cpp1
-rw-r--r--src/sub.cpp1
-rw-r--r--src/xpub.cpp2
-rw-r--r--src/xsub.cpp2
4 files changed, 4 insertions, 2 deletions
diff --git a/src/pub.cpp b/src/pub.cpp
index 25d397c..b888b43 100644
--- a/src/pub.cpp
+++ b/src/pub.cpp
@@ -22,6 +22,7 @@
zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_) :
xpub_t (parent_, tid_)
{
+ options.type = ZMQ_PUB;
}
zmq::pub_t::~pub_t ()
diff --git a/src/sub.cpp b/src/sub.cpp
index 14f6730..bd70a55 100644
--- a/src/sub.cpp
+++ b/src/sub.cpp
@@ -24,6 +24,7 @@
zmq::sub_t::sub_t (class ctx_t *parent_, uint32_t tid_) :
xsub_t (parent_, tid_)
{
+ options.type = ZMQ_SUB;
}
zmq::sub_t::~sub_t ()
diff --git a/src/xpub.cpp b/src/xpub.cpp
index 1659d6f..601ec23 100644
--- a/src/xpub.cpp
+++ b/src/xpub.cpp
@@ -29,7 +29,7 @@ zmq::xpub_t::xpub_t (class ctx_t *parent_, uint32_t tid_) :
active (0),
terminating (false)
{
- options.type = ZMQ_PUB;
+ options.type = ZMQ_XPUB;
options.requires_in = false;
options.requires_out = true;
}
diff --git a/src/xsub.cpp b/src/xsub.cpp
index 21cf8dd..5eef191 100644
--- a/src/xsub.cpp
+++ b/src/xsub.cpp
@@ -30,7 +30,7 @@ zmq::xsub_t::xsub_t (class ctx_t *parent_, uint32_t tid_) :
has_message (false),
more (false)
{
- options.type = ZMQ_SUB;
+ options.type = ZMQ_XSUB;
options.requires_in = true;
options.requires_out = false;
zmq_msg_init (&message);