Patchwork [BUG:2084] check for dict also while setting the port for source brick while doing replace brick

login
register
Submitter Raghavendra Bhat
Date 2010-11-13 07:36:12
Message ID <20101113073612.GA13773@dev.gluster.com>
Download mbox | patch
Permalink /patch/5688/
State Accepted
Headers show

Comments

Raghavendra Bhat - 2010-11-13 07:36:12
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd-op-sm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 62dd7fa..b12dbb5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1024,7 +1024,7 @@  glusterd_op_stage_replace_brick (gd1_mgmt_stage_op_req *req, char **op_errstr,
         if (!glusterd_is_local_addr (src_brickinfo->hostname)) {
                 gf_log ("", GF_LOG_DEBUG,
                         "I AM THE SOURCE HOST");
-                if (src_brickinfo->port) {
+                if (src_brickinfo->port && rsp_dict) {
                         ret = dict_set_int32 (rsp_dict, "src-brick-port",
                                               src_brickinfo->port);
                         if (ret) {