diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-09-02 08:05:36 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-02 09:50:20 -0700 |
commit | c02661a69dfc0c6949666f972129e2983a52cb1f (patch) | |
tree | 1746decb208230e1f404721cb53aa9800a9df15d /xlators | |
parent | 64c230aebd867c84a8320f1d98976bb102727413 (diff) |
mgmt/glusterd: retrieve version upon restart
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
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 3 |
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 1e464eae9..3072fc921 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 4d9834adb..cfa4a7dc4 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); } |