summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorMohammed Junaid Ahmed <junaid@gluster.com>2011-02-14 01:01:19 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-14 14:02:36 -0800
commitd6f065b350a72a34b9a435a89d9b7cb59081bb44 (patch)
tree35e9a3512aed17b6bfce22e9d770b931b6dbe358 /xlators
parent0cc73c92734acc86cb559fc2d3b3ee8c834e5f63 (diff)
syncdaemon: config-get-all option add to gsync cli.
Signed-off-by: Mohammed Junaid <junaid@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 3a2fbd44ccb..5adecef83b7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -5684,21 +5684,51 @@ glusterd_op_send_cli_response (int32_t op, int32_t op_ret,
}
case GD_MGMT_CLI_GSYNC_SET:
{
+ int config_type;
char *str = NULL;
+ char *master = NULL;
+ char *slave = NULL;
+ char *op_name = NULL;
gf1_cli_gsync_set_rsp rsp = {0,};
ctx = op_ctx;
rsp.op_ret = op_ret;
rsp.op_errno = op_errno;
rsp.op_errstr = "";
+ rsp.op_name = "";
+ rsp.master = "";
+ rsp.slave = "";
+ rsp.gsync_prefix = gf_strdup (GSYNCD_PREFIX);
if (ctx) {
ret = dict_get_str (ctx, "errstr",
&str);
if (ret == 0)
rsp.op_errstr = gf_strdup (str);
+ ret = dict_get_int32 (ctx, "config_type",
+ &config_type);
+ if (ret == 0)
+ rsp.type = config_type;
+ ret = dict_get_str (ctx, "master",
+ &master);
+ if (ret == 0)
+ rsp.master = gf_strdup (master);
+
+ ret = dict_get_str (ctx, "slave",
+ &slave);
+ if (ret == 0)
+ rsp.slave = gf_strdup (slave);
+
+ if (config_type ==
+ GF_GSYNC_OPTION_TYPE_CONFIG_GET) {
+ ret = dict_get_str (ctx, "op_name",
+ &op_name);
+ if (ret == 0)
+ rsp.op_name =
+ gf_strdup (op_name);
+ }
} else if (op_errstr)
rsp.op_errstr = op_errstr;
cli_rsp = &rsp;
- sfunc = gf_xdr_from_cli_sync_volume_rsp;
+ sfunc = gf_xdr_serialize_cli_gsync_set_rsp;
break;
}
}