summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-rpc-ops.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 12776065128..de3a382869d 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -815,11 +815,6 @@ gf_cli_get_volume_cbk (struct rpc_req *req, struct iovec *iov,
gf_log ("cli", GF_LOG_INFO, "Received resp to get vol: %d",
rsp.op_ret);
- if (rsp.op_ret) {
- ret = -1;
- goto out;
- }
-
if (!rsp.dict.dict_len) {
if (global_state->mode & GLUSTER_MODE_XML)
goto xml_output;
@@ -869,6 +864,13 @@ gf_cli_get_volume_cbk (struct rpc_req *req, struct iovec *iov,
}
}
+ if (rsp.op_ret) {
+ if (global_state->mode & GLUSTER_MODE_XML)
+ goto xml_output;
+ ret = -1;
+ goto out;
+ }
+
xml_output:
if (global_state->mode & GLUSTER_MODE_XML) {
/* For GET_NEXT_VOLUME output is already begun in