From: Greg Farnum Date: Mon, 15 Mar 2010 21:45:30 +0000 (-0700) Subject: mon: Add a Session operator<<, use it in OSDMonitor X-Git-Tag: v0.20~275^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=390258a73f70ce7410d6200c1949bed4e315b786;p=ceph.git mon: Add a Session operator<<, use it in OSDMonitor --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 75843c78423e..442fe2b6113d 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1007,6 +1007,7 @@ int OSDMonitor::prepare_new_pool(MPoolOp *m) { //check permissions for the auid, then pass off to next function Session * session = (Session *) m->get_connection()->get_priv(); + dout(10) << "prepare_new_pool from Session " << std::endl << session << dendl; if (m->auid) { if(session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_W, m->auid)) { return prepare_new_pool(m->name, m->auid); diff --git a/src/mon/Session.h b/src/mon/Session.h index 57b7addb38c7..6a054ad012d4 100644 --- a/src/mon/Session.h +++ b/src/mon/Session.h @@ -126,4 +126,12 @@ struct SessionMap { } }; +inline ostream& operator<<(ostream& out, const Session *s) +{ + out << "Session: " << s->inst << " is " + << (s->closed ? "closed" : "open"); + out << s->caps; + return out; +} + #endif