]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: reuse 'src_is_mon' bool on dispatch 653/head
authorJoao Eduardo Luis <joao.luis@inktank.com>
Wed, 2 Oct 2013 00:59:11 +0000 (01:59 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 3 Oct 2013 18:29:45 +0000 (19:29 +0100)
Instead of making the same comparison twice with no gain at all.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/Monitor.cc

index d60ffceb87a5b882e34379589c95ea21e07b0a38..42cf3fa661ddf658868d236f2c2f68359f8668f7 100644 (file)
@@ -2600,7 +2600,7 @@ bool Monitor::_ms_dispatch(Message *m)
     m->get_connection()->set_priv(s->get());
     dout(10) << "ms_dispatch new session " << s << " for " << s->inst << dendl;
 
-    if (m->get_connection()->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
+    if (!src_is_mon) {
       dout(10) << "setting timeout on session" << dendl;
       // set an initial timeout here, so we will trim this session even if they don't
       // do anything.