summaryrefslogtreecommitdiff
path: root/src/owned.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-12-02 21:26:47 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-12-02 21:26:47 +0100
commit7146ef85e96551ce6f7b80d014463f246d09c878 (patch)
tree103ccf90868acc3982987643817f385fbde76681 /src/owned.cpp
parentcb84580bbced0b5d34ddcbac6e0aed5d0ad7cae6 (diff)
seqnum mechanism automated
Diffstat (limited to 'src/owned.cpp')
-rw-r--r--src/owned.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/owned.cpp b/src/owned.cpp
index a534dd3..1cb331c 100644
--- a/src/owned.cpp
+++ b/src/owned.cpp
@@ -39,22 +39,6 @@ void zmq::owned_t::inc_seqnum ()
sent_seqnum.add (1);
}
-void zmq::owned_t::process_plug ()
-{
- // Keep track of how many commands were processed so far.
- processed_seqnum++;
-
- finalise_command ();
-}
-
-void zmq::owned_t::process_attach (struct i_engine *engine_)
-{
- // Keep track of how many commands were processed so far.
- processed_seqnum++;
-
- finalise_command ();
-}
-
void zmq::owned_t::term ()
{
send_term_req (owner, this);
@@ -64,11 +48,17 @@ void zmq::owned_t::process_term ()
{
zmq_assert (!shutting_down);
shutting_down = true;
+ finalise ();
+}
- finalise_command ();
+void zmq::owned_t::process_seqnum ()
+{
+ // Catch up with counter of processed commands.
+ processed_seqnum++;
+ finalise ();
}
-void zmq::owned_t::finalise_command ()
+void zmq::owned_t::finalise ()
{
// If termination request was already received and there are no more
// commands to wait for, terminate the object.