]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: combine _ms_dispatch and dispatch
authorSage Weil <sage@redhat.com>
Tue, 29 Sep 2015 13:52:36 +0000 (09:52 -0400)
committerSage Weil <sage@redhat.com>
Tue, 29 Sep 2015 13:52:58 +0000 (09:52 -0400)
_ms_dispatch() is the only caller, and it is confusing to have both
dispatch() and dispatch_op() that take the same argument type.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Monitor.cc
src/mon/Monitor.h

index b49578d3906d4a89b12f87835d42d6b26f128393..2d4d8d72aec2e87632e57c2f2850da01aecff213 100644 (file)
@@ -3416,12 +3416,7 @@ void Monitor::_ms_dispatch(Message *m)
   }
 
   MonOpRequestRef op = op_tracker.create_request<MonOpRequest>(m);
-  dispatch(op);
-}
-
-void Monitor::dispatch(MonOpRequestRef op)
-{
-  op->mark_event("mon:dispatch");
+  op->mark_event("mon:ms_dispatch");
   ConnectionRef connection = op->get_connection();
   MonSession *s = NULL;
   MonCap caps;
@@ -3440,7 +3435,6 @@ void Monitor::dispatch(MonOpRequestRef op)
     reuse_caps = true;
     s = NULL;
   }
-  Message *m = op->get_req();
   if (!s) {
     // if the sender is not a monitor, make sure their first message for a
     // session is an MAuth.  If it is not, assume it's a stray message,
index 929e8a82dd773c0e958135769ec319a89655b25c..9c2ced0d5ea10a186715dad877c639fbbe240b95 100644 (file)
@@ -882,8 +882,6 @@ public:
     lock.Unlock();
     return true;
   }
-  // dissociate message handling from session and connection logic
-  void dispatch(MonOpRequestRef op);
   void dispatch_op(MonOpRequestRef op);
   //mon_caps is used for un-connected messages from monitors
   MonCap * mon_caps;