From 0dd8c38d17e51c4b8bd1471854315e27c25cc615 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Tue, 19 Apr 2011 07:19:17 +0000 Subject: 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 Signed-off-by: Anand Avati BUG: 2785 (gsyncd logs on slave side go to /dev/null) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785 --- xlators/mgmt/glusterd/src/glusterd-rpc-ops.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c') 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, -- cgit