mgr/Session: keep inst, not addr

For parity with log messages from other daemons etc.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-03-14 09:56:56 -04:00
parent 6a314cf420
commit 21297a65a5
2 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,7 @@ bool DaemonServer::ms_verify_authorizer(Connection *con,
}
MgrSessionRef s(new MgrSession);
s->addr = con->get_peer_addr();
s->inst.addr = con->get_peer_addr();
AuthCapsInfo caps_info;
is_valid = handler->verify_authorizer(
@ -383,6 +383,8 @@ bool DaemonServer::handle_command(MCommand *m)
return true;
}
session->put(); // SessionRef takes a ref
if (session->inst.name == entity_name_t())
session->inst.name = m->get_source();
string format;
boost::scoped_ptr<Formatter> f;

View File

@ -16,7 +16,7 @@
struct MgrSession : public RefCountedObject {
uint64_t global_id = 0;
EntityName entity_name;
entity_addr_t addr;
entity_inst_t inst;
// mon caps are suitably generic for mgr
MonCap caps;