diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-10-11 04:28:30 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-11 03:32:55 -0700 |
commit | 74dabe95193a0bc76c3ba149431a9110149a8e9e (patch) | |
tree | 232490e7fc2e95ae2d78a255294a7956fcd034ca | |
parent | 81b6fa2b813d6913dd6329ef6a463669d282ebb6 (diff) |
get the remote-host option from the dictionary in reconfigure
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1898 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1898
-rw-r--r-- | xlators/protocol/client/src/client.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 1cc96532b04..17fcc1a85f3 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -1862,6 +1862,8 @@ reconfigure (xlator_t *this, dict_t *options) clnt_conf_t *conf = NULL; char *old_remote_subvol = NULL; char *new_remote_subvol = NULL; + char *old_remote_host = NULL; + char *new_remote_host = NULL; int subvol_ret = 0; @@ -1924,6 +1926,22 @@ reconfigure (xlator_t *this, dict_t *options) conf->opt.ping_timeout = ping_timeout; } + subvol_ret = dict_get_str (this->options, "remote-host", + &old_remote_host); + + if (subvol_ret == 0) { + + subvol_ret = dict_get_str (options, "remote-host", + &new_remote_host); + + if (subvol_ret == 0) { + if (strcmp (old_remote_host, new_remote_host)) { + ret = 1; + goto out; + } + } + } + subvol_ret = dict_get_str (this->options, "remote-subvolume", &old_remote_subvol); |