msgr: Rename SimpleMessenger::start(daemonize, nonce) to start_with_nonce.

Otherwise, once we remove daemonize from the prototype,
all the existing ->start(false) calls will be taken
to mean nonce=0.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This commit is contained in:
Tommi Virtanen 2011-04-29 11:17:53 -07:00
parent 84454c24d1
commit 0e6bacc6e7
9 changed files with 10 additions and 10 deletions

View File

@ -118,7 +118,7 @@ int main(int argc, const char **argv, const char *envp[]) {
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();

View File

@ -93,7 +93,7 @@ public:
return -1002;
}
if (messenger->start(false, msgr_nonce) != 0) {
if (messenger->start_with_nonce(false, msgr_nonce) != 0) {
shutdown();
return -1003;
}

View File

@ -649,7 +649,7 @@ connect()
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;

View File

@ -56,7 +56,7 @@ void Dumper::init(int rank)
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);

View File

@ -50,7 +50,7 @@ void Resetter::init(int rank)
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);

View File

@ -189,7 +189,7 @@ int MonClient::get_monmap_privately()
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;
}

View File

@ -2317,7 +2317,7 @@ int SimpleMessenger::rebind(int avoid_port)
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;

View File

@ -564,10 +564,10 @@ public:
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();

View File

@ -523,7 +523,7 @@ int ceph_tool_common_init(ceph_tool_mode_t mode)
// 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();