diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-07-26 12:10:08 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-27 01:20:12 -0700 |
commit | a7795fedd4ee2ed7de2dce89fd782ae20b03f6a4 (patch) | |
tree | 60e173fcab4bbcf78060755b93dda83e2b707a42 /rpc/rpc-lib | |
parent | f803fae036177c3b9d9513f5b6300d426366eb62 (diff) |
cli: Changes to provide proper exit status for gluster commandline
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1205 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1205
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 15173d0501d..f2c2736e05e 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -643,6 +643,7 @@ rpc_clnt_handle_reply (struct rpc_clnt *clnt, rpc_transport_pollin_t *pollin) rpc_request_info_t *request_info = NULL; int ret = -1; struct rpc_req req = {0, }; + int cbk_ret = -1; conn = &clnt->conn; @@ -666,7 +667,8 @@ rpc_clnt_handle_reply (struct rpc_clnt *clnt, rpc_transport_pollin_t *pollin) "failed"); } - saved_frame->cbkfn (&req, req.rsp, req.rspcnt, saved_frame->frame); + cbk_ret = saved_frame->cbkfn (&req, req.rsp, req.rspcnt, + saved_frame->frame); if (ret == 0) { rpc_clnt_reply_deinit (&req); @@ -679,7 +681,7 @@ out: GF_FREE (saved_frame); } - return ret; + return cbk_ret; } |