summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-09-02 08:05:36 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-02 09:50:20 -0700
commitc02661a69dfc0c6949666f972129e2983a52cb1f (patch)
tree1746decb208230e1f404721cb53aa9800a9df15d
parent64c230aebd867c84a8320f1d98976bb102727413 (diff)
mgmt/glusterd: retrieve version upon restartv3.1.0qa14
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1265 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1265
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 1e464ea..3072fc9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -940,6 +940,9 @@ glusterd_store_retrieve_volume (char *volname)
} else if (!strncmp (key, GLUSTERD_STORE_KEY_VOL_STATUS,
strlen (GLUSTERD_STORE_KEY_VOL_STATUS))) {
volinfo->status = atoi (value);
+ } else if (!strncmp (key, GLUSTERD_STORE_KEY_VOL_VERSION,
+ strlen (GLUSTERD_STORE_KEY_VOL_VERSION))) {
+ volinfo->version = atoi (value);
} else if (!strncmp (key, GLUSTERD_STORE_KEY_VOL_PORT,
strlen (GLUSTERD_STORE_KEY_VOL_PORT))) {
volinfo->port = atoi (value);
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 4d9834a..cfa4a7d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -174,6 +174,9 @@ glusterd_is_local_addr (char *hostname)
}
ifr++;
}
+
+ if (sd > 0)
+ close (sd);
}