summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-29 06:24:40 +0000
committerAnand Avati <avati@gluster.com>2011-05-09 13:26:48 -0700
commit97fdc05ab86ca2af992c42b09ed40413be2ef0d8 (patch)
tree6ad6a905f34ec7db443e97031ffa62c3f952eaf8 /xlators
parent6dd0282fbfa14eb5a6ae3df1083ef1eea443ea20 (diff)
glusterd / cli / rpc: move geo-replication reply parameters into 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')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index 65ccec4d449..bee892873a2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -259,22 +259,12 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
{
int 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;
- rsp.gsync_prefix = GSYNCD_PREFIX;
if (ctx) {
ret = dict_get_str (ctx, "errstr", &str);
if (ret == 0)
@@ -282,27 +272,15 @@ 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_str (ctx, "master", &master);
- if (ret == 0)
- rsp.master = master;
-
- ret = dict_get_str (ctx, "slave", &slave);
- if (ret == 0)
- rsp.slave = slave;
-
- 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_set_str (ctx, "glusterd_workdir", conf->workdir);
+ /* swallow error here, that will be re-triggered in cli */
ret = dict_allocate_and_serialize (ctx,
- &rsp.status_dict.status_dict_val,
- (size_t*)&rsp.status_dict.status_dict_len);
+ &rsp.dict.dict_val,
+ (size_t*)&rsp.dict.dict_len);
if (ret == 0)
- free_ptr = rsp.status_dict.status_dict_val;
+ free_ptr = rsp.dict.dict_val;
}
if (op_errstr)