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);
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),
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();
}
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();