summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2010-09-27 05:57:51 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-27 11:57:54 -0700
commitf4ff82641baf75cf534531a4dc2eb588db1218cb (patch)
tree61dfcd18e14966cead43210c5a1f9b005ab34f76 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent542476b4bcf248c02ad087381c03c49c2b4c8014 (diff)
mgmt/glusterd: delay probe till connection happens
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1607 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1607
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c16
1 files changed, 6 insertions, 10 deletions
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);