]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: handle_subscribe now uses check_privileges instead of get_caps.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 18 Mar 2010 16:07:06 +0000 (09:07 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 18 Mar 2010 21:47:43 +0000 (14:47 -0700)
src/mon/Monitor.cc

index e783eef2031dc0fae473c85786181cef20f3eb5e..ee572806d799797ca71bc901766c651ac6e29361 100644 (file)
@@ -778,11 +778,11 @@ void Monitor::handle_subscribe(MMonSubscribe *m)
       reply = true;
     session_map.add_update_sub(s, p->first, p->second.have, p->second.onetime);
     if (p->first == "mdsmap") {
-      if ((int)s->caps.get_caps(PAXOS_MDSMAP) & (MON_CAP_R)) {
+      if ((int)s->caps.check_privileges(PAXOS_MDSMAP, MON_CAP_R)) {
         mdsmon()->check_sub(s->sub_map["mdsmap"]);
       }
     } else if (p->first == "osdmap") {
-      if ((int)s->caps.get_caps(PAXOS_OSDMAP) & (MON_CAP_R)) {
+      if ((int)s->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_R)) {
         osdmon()->check_sub(s->sub_map["osdmap"]);
       }
     } else if (p->first == "monmap") {