summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-quota.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-11-02 18:38:50 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-16 01:42:29 -0800
commit7a97478dd1a343fcc5d9d4eab963882191a3de69 (patch)
tree54f48eacb357561a9ebc5f5089e666e0979c7d55 /xlators/mgmt/glusterd/src/glusterd-quota.c
parent913b21621e2dad9146366f24048ff07a8046e5c5 (diff)
XDR: cli-glusterd xdr consolidation
By using only 1 xdr struct for request and 1 xdr struct for response, we will be able scale better and also be able to parse the o/p better For request use- gf1_cli_req - contains dict For response use- gf1_cli_rsp - conains op_ret, op_errno, op_errstr, dict Change-Id: I94b034e1d8fa82dfd0cf96e7602d4039bc43fef3 BUG: 3720 Reviewed-on: http://review.gluster.com/662 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index aebaef974ad..881cf66b49d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -38,7 +38,7 @@ int
glusterd_handle_quota (rpcsvc_request_t *req)
{
int32_t ret = -1;
- gf1_cli_quota_req cli_req = {0,};
+ gf_cli_req cli_req = {{0,}};
dict_t *dict = NULL;
glusterd_op_t cli_op = GD_OP_QUOTA;
char operation[256] = {0, };
@@ -48,7 +48,7 @@ glusterd_handle_quota (rpcsvc_request_t *req)
GF_ASSERT (req);
if (!xdr_to_generic (req->msg[0], &cli_req,
- (xdrproc_t)xdr_gf1_cli_quota_req)) {
+ (xdrproc_t)xdr_gf_cli_req)) {
//failed to decode msg;
req->rpc_err = GARBAGE_ARGS;
goto out;
@@ -116,8 +116,6 @@ out:
ret = glusterd_op_send_cli_response (cli_op, ret, 0, req,
NULL, "operation failed");
}
- if (cli_req.volname)
- free (cli_req.volname); //malloced by xdr
return ret;
}