summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-19 07:19:17 +0000
committerAnand Avati <avati@gluster.com>2011-04-21 00:39:50 -0700
commit0dd8c38d17e51c4b8bd1471854315e27c25cc615 (patch)
tree93a85fc17bf65ba58421afb30be2c9a73ed1c6b5 /xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
parent29ac0febecbca0700bb4b1e2335b8dace5ff452c (diff)
geo-replication: revamp CONFIG command
Drop the config_type RPC req field, use just a "subop" key in the param dict. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2785 (gsyncd logs on slave side go to /dev/null) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index 3b5c3df6bd0..65ccec4d449 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -258,17 +258,19 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
case GD_OP_GSYNC_SET:
{
int type = 0;
- int config_type = 0;
char *str = NULL;
char *master = NULL;
char *slave = NULL;
char *op_name = NULL;
+ char *subop = 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.subop = "";
rsp.master = "";
rsp.slave = "";
rsp.glusterd_workdir = conf->workdir;
@@ -280,10 +282,6 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
ret = dict_get_int32 (ctx, "type", &type);
if (ret == 0)
rsp.type = type;
- ret = dict_get_int32 (ctx, "config_type",
- &config_type);
- if (ret == 0)
- rsp.config_type = config_type;
ret = dict_get_str (ctx, "master", &master);
if (ret == 0)
rsp.master = master;
@@ -292,10 +290,11 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
if (ret == 0)
rsp.slave = slave;
- if (config_type == GF_GSYNC_OPTION_TYPE_CONFIG_GET) {
- ret = dict_get_str (ctx, "op_name", &op_name);
- if (ret == 0)
+ if (type == GF_GSYNC_OPTION_TYPE_CONFIG) {
+ if (dict_get_str (ctx, "op_name", &op_name) == 0)
rsp.op_name = op_name;
+ if (dict_get_str (ctx, "subop", &subop) == 0)
+ rsp.subop = subop;
}
ret = dict_allocate_and_serialize (ctx,