summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2013-11-19 04:48:37 +0000
committerAvra Sengupta <asengupt@redhat.com>2013-11-20 01:51:23 +0000
commitce5e67d497c036ffd0dd89a6ad2245a19ba47694 (patch)
treee55fc63bb7a135b437241db105826f83ca9dbe61 /xlators/mgmt/glusterd/src/glusterd-syncop.c
parentde39983493ce747c6696f1523db59bb67865b22a (diff)
glusterd/snapshot: Added trace statements and handled snapshot create commit failure.
Also handles empty string(not NULL) in gd_syncop_mgmt_brick_op() and adds "Snapshot" in operation list used for printing op during logging. Change-Id: Icac9dce6bf1c087ab2aace9953e2af3a0fb81be6 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 74ce06b2d..2b2a2ec1c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -882,10 +882,12 @@ gd_syncop_mgmt_brick_op (struct rpc_clnt *rpc, glusterd_pending_node_t *pnode,
GD_SYNCOP (rpc, (&args), NULL, gd_syncop_brick_op_cbk, req,
&gd_brick_prog, req->op, xdr_gd1_mgmt_brick_op_req);
- if (args.errstr && errstr)
- *errstr = args.errstr;
- else
- GF_FREE (args.errstr);
+ if (args.errstr) {
+ if ((strlen(args.errstr) > 0) && errstr)
+ *errstr = args.errstr;
+ else
+ GF_FREE (args.errstr);
+ }
if (GD_OP_STATUS_VOLUME == op) {
ret = dict_set_int32 (args.dict, "index", pnode->index);