]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Add a Session operator<<, use it in OSDMonitor
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 15 Mar 2010 21:45:30 +0000 (14:45 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 15 Mar 2010 21:45:30 +0000 (14:45 -0700)
src/mon/OSDMonitor.cc
src/mon/Session.h

index 75843c78423e4ddb956b55af03b4eb4ca6271582..442fe2b6113d8287571fbb261b00df5b4123518d 100644 (file)
@@ -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);
index 57b7addb38c75aa156ce4fde09cea53d51bc4363..6a054ad012d49e7491018550d802292f89a1aff3 100644 (file)
@@ -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