From f4ff82641baf75cf534531a4dc2eb588db1218cb Mon Sep 17 00:00:00 2001 From: Pranith K Date: Mon, 27 Sep 2010 05:57:51 +0000 Subject: mgmt/glusterd: delay probe till connection happens Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1607 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1607 --- xlators/mgmt/glusterd/src/glusterd-utils.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 4d21bbe955b..f99ddde9c92 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -590,7 +590,6 @@ glusterd_resolve_brick (glusterd_brickinfo_t *brickinfo) int32_t ret = -1; glusterd_peerinfo_t *peerinfo = NULL; glusterd_conf_t *priv = NULL; - glusterd_peer_hostname_t *host = NULL; priv = THIS->private; GF_ASSERT (priv); @@ -601,15 +600,6 @@ glusterd_resolve_brick (glusterd_brickinfo_t *brickinfo) if (!ret) { uuid_copy (brickinfo->uuid, peerinfo->uuid); - } else { - list_for_each_entry (host, &priv->hostnames, hostname_list) { - if (!strcmp (host->hostname, brickinfo->hostname)) { - uuid_copy (brickinfo->uuid, priv->uuid); - ret = 0; - break; - } - - } } if (ret) { @@ -729,7 +719,12 @@ int32_t glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo) { GF_ASSERT (peerinfo); + glusterd_peerctx_t *peerctx = NULL; + if (peerinfo->rpc) { + peerctx = peerinfo->rpc->mydata; + peerinfo->rpc->mydata = NULL; + GF_FREE (peerctx); peerinfo->rpc = rpc_clnt_unref (peerinfo->rpc); peerinfo->rpc = NULL; } @@ -974,6 +969,7 @@ glusterd_peer_destroy (glusterd_peerinfo_t *peerinfo) hostname_list) { list_del_init (&name->hostname_list); GF_FREE (name->hostname); + GF_FREE (name); } list_del_init (&peerinfo->hostnames); -- cgit