diff options
author | Martin Lucina <mato@kotelna.sk> | 2011-05-13 12:43:09 +0200 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 08:53:59 +0100 |
commit | ad3e013f74d309b86e8f087932203e5787fe2d2d (patch) | |
tree | a872da7e7338a0bb27b92ef1f198689873b86978 /src/socket_base.cpp | |
parent | f34d1599a651dd0b8feba2397f87629733988384 (diff) | |
parent | b593ea30833ad5dcacb9076c988aec31b0cf26ec (diff) |
Imported Debian patch 2.1.7-1debian/2.1.7-1
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r-- | src/socket_base.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 4317bb0..24789b8 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -61,6 +61,11 @@ #include "xpub.hpp" #include "xsub.hpp" +bool zmq::socket_base_t::check_tag () +{ + return tag == 0xbaddecaf; +} + zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, uint32_t tid_) { @@ -110,6 +115,7 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_) : own_t (parent_, tid_), + tag (0xbaddecaf), ctx_terminated (false), destroyed (false), last_tsc (0), @@ -126,6 +132,9 @@ zmq::socket_base_t::~socket_base_t () sessions_sync.lock (); zmq_assert (sessions.empty ()); sessions_sync.unlock (); + + // Mark the socket as dead. + tag = 0xdeadbeef; } zmq::mailbox_t *zmq::socket_base_t::get_mailbox () |