mirror of
https://github.com/ceph/ceph
synced 2025-03-19 17:06:24 +00:00
mon: fix Monitor::_get_moncommand()
It should match command prefix, not any substring. Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
parent
14dbe1ded2
commit
3ff4821307
@ -2430,7 +2430,7 @@ const MonCommand *Monitor::_get_moncommand(const string &cmd_prefix,
|
||||
MonCommand *this_cmd = NULL;
|
||||
for (MonCommand *cp = cmds;
|
||||
cp < &cmds[cmds_size]; cp++) {
|
||||
if (cp->cmdstring.find(cmd_prefix) != string::npos) {
|
||||
if (cp->cmdstring.compare(0, cmd_prefix.size(), cmd_prefix) == 0) {
|
||||
this_cmd = cp;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user