From 74dabe95193a0bc76c3ba149431a9110149a8e9e Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Mon, 11 Oct 2010 04:28:30 +0000 Subject: get the remote-host option from the dictionary in reconfigure Signed-off-by: Raghavendra Bhat Signed-off-by: Vijay Bellur BUG: 1898 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1898 --- xlators/protocol/client/src/client.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 1cc96532b..17fcc1a85 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); -- cgit