]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg: debug Connection refs
authorSage Weil <sage@inktank.com>
Tue, 1 Jul 2014 23:43:46 +0000 (16:43 -0700)
committerSage Weil <sage@inktank.com>
Thu, 3 Jul 2014 21:28:25 +0000 (14:28 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Monitor.cc
src/msg/Message.h
src/msg/Pipe.cc
src/msg/SimpleMessenger.cc

index f983284eb8d232670acbd05bdd3cc9bac7b82fc7..8e10124479586529f9cca75355da1188160a8909 100644 (file)
@@ -2633,7 +2633,7 @@ void Monitor::handle_forward(MForward *m)
     dout(0) << "forward from entity with insufficient caps! " 
            << session->caps << dendl;
   } else {
-    Connection *c = new Connection(NULL);  // msgr must be null; see PaxosService::dispatch()
+    Connection *c = new Connection(g_ceph_context, NULL);  // msgr must be null; see PaxosService::dispatch()
     MonSession *s = new MonSession(m->msg->get_source_inst(), c);
     c->set_priv(s);
     c->set_peer_addr(m->client.addr);
index f3c9a4c8dca9c38d4e5e4bbd9e2e8f33c9d6ccf1..0205eed957e96251305098ac01ffd57a438261d5 100644 (file)
@@ -190,8 +190,9 @@ public:
   friend class boost::intrusive_ptr<Connection>;
 
 public:
-  Connection(Messenger *m)
-    : lock("Connection::lock"),
+  Connection(CephContext *cct, Messenger *m)
+    : RefCountedObject(cct),
+      lock("Connection::lock"),
       msgr(m),
       priv(NULL),
       peer_type(-1),
index e0c5ef9dc8e4022c436401e39960961ebab4f2ac..68825f8c1c84bcfd9025cb273c3e74d29d23c09b 100644 (file)
@@ -95,7 +95,7 @@ Pipe::Pipe(SimpleMessenger *r, int st, Connection *con)
     connection_state = con;
     connection_state->reset_pipe(this);
   } else {
-    connection_state = new Connection(msgr);
+    connection_state = new Connection(msgr->cct, msgr);
     connection_state->pipe = get();
   }
 
index 4a8711f722daf8ea84b98646a0c506dff468433c..3962d3bc09211c8a521d1f639882c66943f6acda 100644 (file)
@@ -52,7 +52,7 @@ SimpleMessenger::SimpleMessenger(CephContext *cct, entity_name_t name,
     dispatch_throttler(cct, string("msgr_dispatch_throttler-") + mname, cct->_conf->ms_dispatch_throttle_bytes),
     reaper_started(false), reaper_stop(false),
     timeout(0),
-    local_connection(new Connection(this))
+    local_connection(new Connection(cct, this))
 {
   ceph_spin_init(&global_seq_lock);
   init_local_connection();