summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-05 01:53:37 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-06 03:37:09 -0700
commit737782bb930dae296605d53ed8d25ee8dbb23d87 (patch)
tree45aeed212f86ce07af71104476ff9e5231a26ec5 /xlators/mgmt
parentd1d06c102cfb6ea04a5e6f7db414a00c1a8351e2 (diff)
if rpc->status is not SUCCESS, don't decode the msg
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1753 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1753
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd3_1-mops.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
index 2ac20470088..7169121d574 100644
--- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
+++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
@@ -148,6 +148,7 @@ glusterd3_1_friend_add_cbk (struct rpc_req * req, struct iovec *iov,
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
+ goto out;
}
ret = gd_xdr_to_mgmt_friend_rsp (*iov, &rsp);
@@ -315,6 +316,7 @@ glusterd3_1_friend_update_cbk (struct rpc_req *req, struct iovec *iov,
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
+ goto out;
}
/* ret = gd_xdr_to_mgmt_friend_update_rsp (*iov, &rsp);
@@ -332,7 +334,7 @@ glusterd3_1_friend_update_cbk (struct rpc_req *req, struct iovec *iov,
"Received %s from uuid: %s",
(op_ret)?"RJT":"ACC", str);
-//out:
+out:
return ret;
}
int32_t
@@ -351,6 +353,7 @@ glusterd3_1_cluster_lock_cbk (struct rpc_req *req, struct iovec *iov,
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
+ goto out;
}
ret = gd_xdr_to_mgmt_cluster_lock_rsp (*iov, &rsp);
@@ -388,9 +391,6 @@ glusterd3_1_cluster_lock_cbk (struct rpc_req *req, struct iovec *iov,
glusterd_op_sm ();
}
- return ret;
-
-
out:
return ret;
}
@@ -412,6 +412,7 @@ glusterd3_1_cluster_unlock_cbk (struct rpc_req *req, struct iovec *iov,
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
+ goto out;
}
ret = gd_xdr_to_mgmt_cluster_unlock_rsp (*iov, &rsp);
@@ -442,7 +443,6 @@ glusterd3_1_cluster_unlock_cbk (struct rpc_req *req, struct iovec *iov,
event_type = GD_OP_EVENT_RCVD_ACC;
}
-
ret = glusterd_op_sm_inject_event (event_type, NULL);
if (!ret) {
@@ -450,9 +450,6 @@ glusterd3_1_cluster_unlock_cbk (struct rpc_req *req, struct iovec *iov,
glusterd_op_sm ();
}
- return ret;
-
-
out:
return ret;
}
@@ -468,12 +465,12 @@ glusterd3_1_stage_op_cbk (struct rpc_req *req, struct iovec *iov,
glusterd_peerinfo_t *peerinfo = NULL;
char str[50] = {0,};
-
GF_ASSERT (req);
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
+ goto out;
}
ret = gd_xdr_to_mgmt_stage_op_rsp (*iov, &rsp);
@@ -511,9 +508,6 @@ glusterd3_1_stage_op_cbk (struct rpc_req *req, struct iovec *iov,
glusterd_op_sm ();
}
- return ret;
-
-
out:
return ret;
}
@@ -535,6 +529,7 @@ glusterd3_1_commit_op_cbk (struct rpc_req *req, struct iovec *iov,
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
+ goto out;
}
ret = gd_xdr_to_mgmt_commit_op_rsp (*iov, &rsp);