diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index b85e647f4..9f6659bda 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -620,10 +620,11 @@ glusterd_handle_commit_op (rpcsvc_request_t *req) if (ret) goto out; - ret = glusterd_op_sm_inject_event (GD_OP_EVENT_COMMIT_OP, req_ctx); + ret = glusterd_op_init_ctx (op_req.op); if (ret) goto out; - ret = glusterd_op_init_ctx (op_req.op); + + ret = glusterd_op_sm_inject_event (GD_OP_EVENT_COMMIT_OP, req_ctx); out: free (op_req.buf.buf_val);//malloced by xdr @@ -915,8 +916,9 @@ out: else rsp.op_errstr = ""; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, (xdrproc_t)xdr_gf_cli_rsp); + ret = 0; if (dict) dict_unref (dict); @@ -1767,8 +1769,9 @@ respond: rsp.hostname = probe_req.hostname; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, - (xdrproc_t)xdr_gd1_mgmt_probe_rsp); + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + (xdrproc_t)xdr_gd1_mgmt_probe_rsp); + ret = 0; gf_log ("glusterd", GF_LOG_INFO, "Responded to %s, op_ret: %d, " "op_errno: %d, ret: %d", remote_hostname, @@ -1860,8 +1863,9 @@ glusterd_handle_getwd (rpcsvc_request_t *req) rsp.wd = priv->workdir; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, - (xdrproc_t)xdr_gf1_cli_getwd_rsp); + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + (xdrproc_t)xdr_gf1_cli_getwd_rsp); + ret = 0; glusterd_friend_sm (); glusterd_op_sm (); @@ -1916,8 +1920,9 @@ glusterd_handle_mount (rpcsvc_request_t *req) if (!rsp.path) rsp.path = ""; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, - (xdrproc_t)xdr_gf1_cli_mount_rsp); + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + (xdrproc_t)xdr_gf1_cli_mount_rsp); + ret = 0; if (dict) dict_unref (dict); @@ -2005,8 +2010,9 @@ glusterd_handle_umount (rpcsvc_request_t *req) if (rsp.op_errno) rsp.op_ret = -1; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, - (xdrproc_t)xdr_gf1_cli_umount_rsp); + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + (xdrproc_t)xdr_gf1_cli_umount_rsp); + ret = 0; glusterd_friend_sm (); glusterd_op_sm (); @@ -2470,8 +2476,9 @@ out: rsp.op_ret = ret; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, - (xdrproc_t)xdr_gf1_cli_peer_list_rsp); + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + (xdrproc_t)xdr_gf1_cli_peer_list_rsp); + ret = 0; GF_FREE (rsp.friends.friends_val); return ret; @@ -2573,8 +2580,9 @@ out: rsp.op_ret = ret; rsp.op_errstr = ""; - ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, - (xdrproc_t)xdr_gf_cli_rsp); + glusterd_submit_reply (req, &rsp, NULL, 0, NULL, + (xdrproc_t)xdr_gf_cli_rsp); + ret = 0; if (volumes) dict_unref (volumes); |