]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon:some cleanup in MonmapMonitor.cc
authorrenhwztetecs <rhwlyw@163.com>
Fri, 29 Jan 2016 05:40:24 +0000 (13:40 +0800)
committerrenhwztetecs <rhwlyw@163.com>
Fri, 29 Jan 2016 05:40:24 +0000 (13:40 +0800)
remove the processing of  ”mon add“ && “mon remove” in the preprocess_command;
delete unused "get_monmap(MonMap &m)"

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
src/mon/MonmapMonitor.cc

index 900c2912771c055fc8737b90b3dfd12d7a36877d..0dcc2d40a4d864b6e175baa3d2f61face84a87f0 100644 (file)
@@ -240,10 +240,6 @@ bool MonmapMonitor::preprocess_command(MonOpRequestRef op)
     if (p != mon->monmap)
        delete p;
   }
-  else if (prefix == "mon add")
-    return false;
-  else if (prefix == "mon remove")
-    return false;
 
 reply:
   if (r != -1) {
@@ -582,16 +578,3 @@ int MonmapMonitor::get_monmap(bufferlist &bl)
   }
   return 0;
 }
-
-int MonmapMonitor::get_monmap(MonMap &m)
-{
-  dout(10) << __func__ << dendl;
-  bufferlist monmap_bl;
-
-  int err = get_monmap(monmap_bl);
-  if (err < 0) {
-    return err;
-  }
-  m.decode(monmap_bl);
-  return 0;
-}