summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 7e5cddac88d..70734074fa7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -1890,11 +1890,12 @@ out:
int
glusterd_op_stage_send_resp (rpcsvc_request_t *req,
- int32_t op, int32_t status, char *op_errstr)
+ int32_t op, int32_t status,
+ char *op_errstr, dict_t *rsp_dict)
{
- gd1_mgmt_stage_op_rsp rsp = {{0},};
- int ret = -1;
+ gd1_mgmt_stage_op_rsp rsp = {{0},};
+ int ret = -1;
GF_ASSERT (req);
rsp.op_ret = status;
@@ -1905,6 +1906,15 @@ glusterd_op_stage_send_resp (rpcsvc_request_t *req,
else
rsp.op_errstr = "";
+ ret = dict_allocate_and_serialize (rsp_dict,
+ &rsp.dict.dict_val,
+ (size_t *)&rsp.dict.dict_len);
+ if (ret < 0) {
+ gf_log ("", GF_LOG_DEBUG,
+ "failed to get serialized length of dict");
+ return ret;
+ }
+
ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
gd_xdr_serialize_mgmt_stage_op_rsp);