summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd3_1-mops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd3_1-mops.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
index 3777e699268..ad3eb5cc31e 100644
--- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
+++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
@@ -1215,9 +1215,17 @@ glusterd_handle_rpc_msg (rpcsvc_request_t *req)
out:
if (ret && is_cli_req) {
- glusterd_op_send_cli_response (req->procnum, ret, 0, req);
+ /* if we are sending a reply here, then return value should
+ be 0, and we should not point to any RPC errors, because
+ otherwise rpcsvc.c will send an error reply for the same
+ request, which causes double replies */
+ ret = glusterd_op_send_cli_response (req->procnum, ret, 0, req);
+ if (!ret)
+ req->rpc_err = SUCCESS;
}
- gf_log ("", GF_LOG_NORMAL, "Returning %d", ret);
+ if (!ret)
+ gf_log ("", GF_LOG_WARNING, "Returning %d", ret);
+
return ret;
}