summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2011-09-15 17:09:00 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-15 22:06:30 -0700
commit4ee093305a0237368118e425723792a028b02a94 (patch)
tree6463dc776aa9d826b71e6308fa832874d7cd4859 /xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
parent77cce4c7df9a61b599a27522696720e747714ff2 (diff)
glusterd: profile cmd incorrectly reports all bricks down.
If there are no bricks of a volume running 'local' to glusterd where the 'profile info' command is issued, glusterd incorrectly reports that all bricks of the volume are down. Change-Id: Idd703c991f0bcf59b76b9ef8f4ad8cd71960a55b BUG: 3553 Reviewed-on: http://review.gluster.com/430 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index aa493bd76ef..3c7b6285562 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -318,9 +318,10 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
else
rsp.op_errstr = "";
ctx = op_ctx;
- dict_allocate_and_serialize (ctx,
- &rsp.stats_info.stats_info_val,
- (size_t*)&rsp.stats_info.stats_info_len);
+ if (ctx)
+ dict_allocate_and_serialize (ctx,
+ &rsp.stats_info.stats_info_val,
+ (size_t*)&rsp.stats_info.stats_info_len);
free_ptr = rsp.stats_info.stats_info_val;
cli_rsp = &rsp;
xdrproc = (xdrproc_t) xdr_gf1_cli_stats_volume_rsp;