diff options
author | Pranith K <pranithk@gluster.com> | 2011-02-24 06:16:36 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-02-28 23:10:18 -0800 |
commit | 63f00588bbfd477c2f4579fd4392c14679dd7ac0 (patch) | |
tree | ca8c2cc33e2b89863a7eef7c683f5538dc75b21c /cli/src/cli3_1-cops.c | |
parent | 8a96aa607b4e3a6c782a0d912b6bf101f82f7c07 (diff) |
mgmt/glusterd: prevent spurious cmd unlocks
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2460 ([glusterfs-3.2.0-gsync1]: gluserd crashed trying to access freed request)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2460
Diffstat (limited to 'cli/src/cli3_1-cops.c')
-rw-r--r-- | cli/src/cli3_1-cops.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index 1f54b86be..b409a8710 100644 --- a/cli/src/cli3_1-cops.c +++ b/cli/src/cli3_1-cops.c @@ -919,22 +919,12 @@ out: return ret; } -void -_cli_out_options (dict_t *this, char *key, data_t *value, void *count) -{ - - (*((int *) count))++; - cli_out ("%s - %s", key, value->data); -} - int gf_cli3_1_set_volume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *myframe) { gf1_cli_set_vol_rsp rsp = {0,}; int ret = 0; - dict_t *dict = NULL; - int dict_count = 0; if (-1 == req->rpc_status) { goto out; @@ -946,39 +936,6 @@ gf_cli3_1_set_volume_cbk (struct rpc_req *req, struct iovec *iov, goto out; } - if (rsp.op_ret == 1) { // if the command was volume set <vol> history - - if (!rsp.dict.dict_len) { - cli_out ("No volumes present"); - ret = 0; - goto out; - } - - dict = dict_new (); - - if (!dict) { - ret = -1; - goto out; - } - - ret = dict_unserialize (rsp.dict.dict_val, - rsp.dict.dict_len, - &dict); - - if (ret) { - gf_log ("", GF_LOG_ERROR, - "Unable to allocate memory"); - goto out; - } - cli_out ("Options:"); - dict_foreach (dict, _cli_out_options, &dict_count); - if (!dict_count) - cli_out ("No Options Reconfigured!!"); - goto out; - } - - - gf_log ("cli", GF_LOG_NORMAL, "Received resp to set"); if (rsp.op_ret && strcmp (rsp.op_errstr, "")) |