cout << "cfuse[" << getpid() << "]: starting ceph client" << std::endl;
- messenger->start(false, getpid()); // Do not daemonize here
+ messenger->start_with_nonce(false, getpid()); // Do not daemonize here
// start client
client->init();
return -1002;
}
- if (messenger->start(false, msgr_nonce) != 0) {
+ if (messenger->start_with_nonce(false, msgr_nonce) != 0) {
shutdown();
return -1003;
}
rados_instance.inc();
nonce = getpid() + (1000000 * (uint64_t)rados_instance.read());
- messenger->start(false, nonce); // do not daemonize
+ messenger->start_with_nonce(false, nonce); // do not daemonize
messenger->add_dispatcher_head(this);
dout(1) << "setting wanted keys" << dendl;
messenger->register_entity(entity_name_t::CLIENT());
messenger->add_dispatcher_head(this);
- messenger->start(false, getpid()); // do not daemonize
+ messenger->start_with_nonce(false, getpid()); // do not daemonize
monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
monc->set_messenger(messenger);
messenger->register_entity(entity_name_t::CLIENT());
messenger->add_dispatcher_head(this);
- messenger->start(false, getpid());
+ messenger->start_with_nonce(false, getpid());
monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
monc->set_messenger(messenger);
messenger = smessenger = new SimpleMessenger();
smessenger->register_entity(entity_name_t::CLIENT(-1));
messenger->add_dispatcher_head(this);
- smessenger->start(false, getpid()); // do not daemonize!
+ smessenger->start_with_nonce(false, getpid()); // do not daemonize!
temp_msgr = true;
}
return accepter.rebind(avoid_port);
}
-int SimpleMessenger::start(bool daemonize, uint64_t nonce)
+int SimpleMessenger::start_with_nonce(bool daemonize, uint64_t nonce)
{
lock.Lock();
dout(1) << "messenger.start" << dendl;
int bind(uint64_t nonce) {
return bind(g_conf.public_addr, nonce);
}
- int start(bool daemonize, uint64_t nonce); // if we didn't bind
+ int start_with_nonce(bool daemonize, uint64_t nonce); // if we didn't bind
int start(bool daemonize) { // if we did
assert(did_bind);
- return start(daemonize, 0);
+ return start_with_nonce(daemonize, 0);
}
void wait();
// start up network
messenger = new SimpleMessenger();
messenger->register_entity(entity_name_t::CLIENT());
- messenger->start(false, getpid()); // do not daemonize
+ messenger->start_with_nonce(false, getpid()); // do not daemonize
messenger->add_dispatcher_head(&dispatcher);
g.lock.Lock();