diff options
author | Kaushal M <kaushal@redhat.com> | 2012-05-10 16:11:17 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-18 19:45:47 -0700 |
commit | 3213a4e013e6f4a67772daa329761f42fea881f0 (patch) | |
tree | f965dcd1061ec695d298d63ebafa8564474b180e /xlators/mgmt/glusterd/src/glusterd-handler.c | |
parent | feb99ca3081f838faf9fd9cebfabab8d4c9d015c (diff) |
glusterd,cli: Enable errstr for peer detach
This patch adds an op_errstr member to the gf1_cli_deprobe_rsp structure to
enable return of an errstr to cli.
Change-Id: I0cbb6805b05d7cc0603c13d1c1550bb2bd062a7a
BUG: 816840
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3307
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 0950161532a..cc8e2d0eea1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -783,7 +783,7 @@ glusterd_handle_cli_deprobe (rpcsvc_request_t *req) cli_req.port, (ret) ? "FAILED" : "SUCCESS"); out: if (ret) { - ret = glusterd_xfer_cli_deprobe_resp (req, ret, op_errno, + ret = glusterd_xfer_cli_deprobe_resp (req, ret, op_errno, NULL, cli_req.hostname); } @@ -2398,7 +2398,8 @@ glusterd_xfer_cli_probe_resp (rpcsvc_request_t *req, int32_t op_ret, int glusterd_xfer_cli_deprobe_resp (rpcsvc_request_t *req, int32_t op_ret, - int32_t op_errno, char *hostname) + int32_t op_errno, char *op_errstr, + char *hostname) { gf1_cli_deprobe_rsp rsp = {0, }; int32_t ret = -1; @@ -2407,6 +2408,7 @@ glusterd_xfer_cli_deprobe_resp (rpcsvc_request_t *req, int32_t op_ret, rsp.op_ret = op_ret; rsp.op_errno = op_errno; + rsp.op_errstr = op_errstr ? op_errstr : ""; rsp.hostname = hostname; ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, |