summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2011-02-24 06:16:36 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-28 23:10:18 -0800
commit63f00588bbfd477c2f4579fd4392c14679dd7ac0 (patch)
treeca8c2cc33e2b89863a7eef7c683f5538dc75b21c /cli
parent8a96aa607b4e3a6c782a0d912b6bf101f82f7c07 (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')
-rw-r--r--cli/src/cli-cmd-parser.c13
-rw-r--r--cli/src/cli3_1-cops.c43
2 files changed, 0 insertions, 56 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index a90e6a75e45..8cfdc808a14 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -388,19 +388,6 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options)
key = (char *) words[i];
value = (char *) words[i+1];
- if ( key && !value ) {
- if ( !strcmp (key, "history")) {
- ret = dict_set_str (dict, key, "history");
- if (ret)
- goto out;
- ret = dict_set_int32 (dict, "count", 1);
- if (ret)
- goto out;
- *options = dict;
- goto out;
- }
- }
-
if ( !key || !value) {
ret = -1;
goto out;
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index 1f54b86bef8..b409a87104b 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, ""))