summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2010-11-12 04:01:01 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-13 07:02:51 -0800
commit20fb15dc02a4d1a4b38335a988c0c1abafee7355 (patch)
tree8503c2df5a758650a7d9f6efcd77bb23e8d585ab /xlators/mgmt/glusterd/src/glusterd-store.c
parentfe349e42baa47dd7c010707bddbd114946f4d95b (diff)
mgmt/glusterd: "peer probe new-hostname" should replace old-hostname of friend
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1995 (Gluster Peer probe command keeps ip address instead of server name in the destination server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1995
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 4b989521974..aa63226a5aa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1312,8 +1312,6 @@ glusterd_store_update_peerinfo (glusterd_peerinfo_t *peerinfo)
char filepath[PATH_MAX] = {0,};
char str[512] = {0,};
char buf[4096] = {0,};
- glusterd_peer_hostname_t *hname = NULL;
- int i = 0;
char hostname_path[PATH_MAX] = {0,};
@@ -1383,15 +1381,9 @@ glusterd_store_update_peerinfo (glusterd_peerinfo_t *peerinfo)
if (ret)
goto out;
- list_for_each_entry (hname, &peerinfo->hostnames, hostname_list) {
- i++;
- snprintf (buf, sizeof (buf), "%s%d",
- GLUSTERD_STORE_KEY_PEER_HOSTNAME, i);
- ret = glusterd_store_save_value (peerinfo->shandle,
- buf, hname->hostname);
- if (ret)
- goto out;
- }
+ ret = glusterd_store_save_value (peerinfo->shandle,
+ GLUSTERD_STORE_KEY_PEER_HOSTNAME "1",
+ peerinfo->hostname);
out:
gf_log ("", GF_LOG_DEBUG, "Returning with %d", ret);