mon:some cleanup in MonmapMonitor.cc

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>
This commit is contained in:
renhwztetecs 2016-01-29 13:40:24 +08:00
parent 67e3d95135
commit 698e4a1c71

View 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;
}