From: John Spray Date: Thu, 30 Jun 2016 23:01:09 +0000 (+0100) Subject: mds: return error on empty command message X-Git-Tag: ses5-milestone5~308^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c49d87b87d20969f9bd6f7ab6d678cfe1ba79c3d;p=ceph.git mds: return error on empty command message Previously this returned 0 and an empty response, which in turn upsets the python code that calls commands. Signed-off-by: John Spray --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index 869daaef7a92..fa4231db80d5 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -603,6 +603,7 @@ void MDSDaemon::handle_command(MCommand *m) ss << "permission denied"; r = -EPERM; } else if (m->cmd.empty()) { + r = -EINVAL; ss << "no command given"; outs = ss.str(); } else if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) {