diff options
author | Sage Weil <sage@inktank.com> | 2013-05-08 11:05:29 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-08 11:09:43 -0700 |
commit | 30ffca77df006a244044604074779af538721f14 (patch) | |
tree | d0ae75f439869b92146a5537d0771ea351e68ef1 | |
parent | 237f3f1e8d8c3b85666529860285dcdffdeda4c5 (diff) | |
download | ceph-30ffca77df006a244044604074779af538721f14.tar.gz |
ceph: return error code when failing to get result from admin socket
Make sure we return a non-zero result code when we fail to read something
from the admin socket.
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 393c9372f82ef37fc6497dd46fc453507a463d42)
-rw-r--r-- | src/tools/ceph.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/ceph.cc b/src/tools/ceph.cc index ed6a5342807..49a0a0eced7 100644 --- a/src/tools/ceph.cc +++ b/src/tools/ceph.cc @@ -246,6 +246,7 @@ int do_admin_socket(string path, string cmd) } if (r < 4) { cerr << "read only got " << r << " bytes of 4 expected for response length; invalid command?" << std::endl; + r = -1; goto out; } len = ntohl(len); |