]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: return error on empty command message
authorJohn Spray <john.spray@redhat.com>
Thu, 30 Jun 2016 23:01:09 +0000 (00:01 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 19 Jul 2016 12:59:34 +0000 (13:59 +0100)
Previously this returned 0 and an empty
response, which in turn upsets the python
code that calls commands.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSDaemon.cc

index 869daaef7a92b29db1aff9e514c3b5ef2c7c35ba..fa4231db80d5fea82c708e8130ef968408cbf7b2 100644 (file)
@@ -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)) {