Skip to content

Commit

Permalink
testmsgr.cc: use set_val / apply_changes
Browse files Browse the repository at this point in the history
Signed-off-by: Colin McCabe <[email protected]>
  • Loading branch information
cmccabe committed Sep 14, 2011
1 parent 6a4a707 commit 1312f18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/testmsgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ int main(int argc, const char **argv, const char *envp[]) {
// start up network
int whoami = mc.monmap.get_rank(args[0]);
assert(whoami >= 0);
g_conf->public_addr = mc.monmap.get_addr(whoami);
ostringstream ss;
ss << mc.monmap.get_addr(whoami);
std::string sss(ss.str());
g_ceph_context->_conf->set_val("public_addr", sss.c_str());
g_ceph_context->_conf->apply_changes(NULL);
SimpleMessenger *rank = new SimpleMessenger(g_ceph_context);
int err = rank->bind(getpid());
if (err < 0)
Expand Down

0 comments on commit 1312f18

Please sign in to comment.