From 5153b6368be58d0fcaea262463a3fc08ea658f78 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 19 Sep 2010 08:39:53 +0200 Subject: obsolete 'active' flag removed from session_t --- src/session.cpp | 11 +++-------- src/session.hpp | 3 --- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/session.cpp b/src/session.cpp index eb23eee..eb8967a 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -31,7 +31,6 @@ zmq::session_t::session_t (class io_thread_t *io_thread_, options (options_), in_pipe (NULL), incomplete_in (false), - active (true), out_pipe (NULL), engine (NULL), socket (socket_), @@ -60,13 +59,11 @@ void zmq::session_t::terminate () bool zmq::session_t::read (::zmq_msg_t *msg_) { - if (!in_pipe || !active) + if (!in_pipe) return false; - if (!in_pipe->read (msg_)) { - active = false; + if (!in_pipe->read (msg_)) return false; - } incomplete_in = msg_->flags & ZMQ_MSG_MORE; return true; @@ -117,7 +114,6 @@ void zmq::session_t::attach_pipes (class reader_t *inpipe_, if (inpipe_) { zmq_assert (!in_pipe); in_pipe = inpipe_; - active = true; in_pipe->set_event_sink (this); } @@ -133,7 +129,6 @@ void zmq::session_t::attach_pipes (class reader_t *inpipe_, void zmq::session_t::terminated (reader_t *pipe_) { - active = false; in_pipe = NULL; finalise (); } @@ -147,7 +142,7 @@ void zmq::session_t::terminated (writer_t *pipe_) void zmq::session_t::activated (reader_t *pipe_) { zmq_assert (in_pipe == pipe_); - active = true; + if (engine) engine->activate_out (); } diff --git a/src/session.hpp b/src/session.hpp index 38cf317..ff1e87b 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -104,9 +104,6 @@ namespace zmq // is still in the in pipe. bool incomplete_in; - // If true, in_pipe is active. Otherwise there are no messages to get. - bool active; - // Outbound pipe, i.e. one the socket is sending messages to. class writer_t *out_pipe; -- cgit v1.2.3