From a7795fedd4ee2ed7de2dce89fd782ae20b03f6a4 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 26 Jul 2010 12:10:08 +0000 Subject: cli: Changes to provide proper exit status for gluster commandline Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 1205 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1205 --- rpc/rpc-lib/src/rpc-clnt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rpc/rpc-lib') 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; } -- cgit