From c9c0fe3f7d737b175dea3833071f3e54d2f412fa Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Wed, 12 Dec 2012 17:34:43 +0530 Subject: cli: Fixing the xml output in failure cases for gluster peer probe Change-Id: I9ebec995cbf47d9ced7140e37787e74ff9c63769 BUG: 879490 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/4301 Reviewed-by: Kaushal M Tested-by: Gluster Build System --- cli/src/cli-rpc-ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-rpc-ops.c') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index da239b51..a5314378 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -179,8 +179,10 @@ gf_cli_probe_cbk (struct rpc_req *req, struct iovec *iov, } if (global_state->mode & GLUSTER_MODE_XML) { - ret = cli_xml_output_str ("peerProbe", msg, rsp.op_ret, - rsp.op_errno, NULL); + ret = cli_xml_output_str (NULL, + (rsp.op_ret == -1)? NULL : msg, + rsp.op_ret, rsp.op_errno, + (rsp.op_ret == -1)? msg : NULL); if (ret) gf_log ("cli", GF_LOG_ERROR, "Error outputting to xml"); -- cgit