From: Sage Weil Date: Tue, 29 Sep 2015 13:52:36 +0000 (-0400) Subject: mon: combine _ms_dispatch and dispatch X-Git-Tag: v9.1.0~31^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bba3ab367e5ff5345fc14d87b1fa6eb82b8cfb1b;p=ceph.git mon: combine _ms_dispatch and dispatch _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 --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index b49578d3906d..2d4d8d72aec2 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3416,12 +3416,7 @@ void Monitor::_ms_dispatch(Message *m) } MonOpRequestRef op = op_tracker.create_request(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, diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 929e8a82dd77..9c2ced0d5ea1 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -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;