From: Sage Weil Date: Wed, 8 May 2013 18:05:29 +0000 (-0700) Subject: ceph: return error code when failing to get result from admin socket X-Git-Tag: v0.62~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=393c9372f82ef37fc6497dd46fc453507a463d42;p=ceph.git 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 --- diff --git a/src/tools/ceph.cc b/src/tools/ceph.cc index ed6a5342807c..49a0a0eced7f 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);