diff options
| author | Mohammed Rafi KC <rkavunga@redhat.com> | 2017-05-29 16:19:40 +0530 | 
|---|---|---|
| committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-07-03 12:49:32 +0000 | 
| commit | 4328d6412d30ce538ec87e1f124ebe3b2a0e131e (patch) | |
| tree | 175775fd767d8ce0b914eb59cef2d56b56478b91 | |
| parent | 109b6f34ca12e5f5de68ece43e4a425cbb6249d4 (diff) | |
socket/reconfigure: reconfigure should be done on new dict
In socket reconfigure, reconfigurations are doing with old
dict values. It should be with new reconfigured dict values
Backport of>
>Change-Id: Iac5ad4382fe630806af14c99bb7950a288756a87
>BUG: 1456405
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
>Reviewed-on: https://review.gluster.org/17412
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Change-Id: Iac5ad4382fe630806af14c99bb7950a288756a87
BUG: 1463517
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: https://review.gluster.org/17588
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
| -rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index e14152c5822..b5eeba085c1 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3860,7 +3860,7 @@ reconfigure (rpc_transport_t *this, dict_t *options)          priv = this->private; -        if (dict_get_str (this->options, "transport.socket.keepalive", +        if (dict_get_str (options, "transport.socket.keepalive",                            &optstr) == 0) {                  if (gf_string2boolean (optstr, &tmp_bool) == -1) {                          gf_log (this->name, GF_LOG_ERROR, @@ -3877,33 +3877,33 @@ reconfigure (rpc_transport_t *this, dict_t *options)          else                  priv->keepalive = 1; -        if (dict_get_int32 (this->options, "transport.tcp-user-timeout", +        if (dict_get_int32 (options, "transport.tcp-user-timeout",                              &(priv->timeout)) != 0)                  priv->timeout = timeout;          gf_log (this->name, GF_LOG_DEBUG, "Reconfigued "                  "transport.tcp-user-timeout=%d", priv->timeout); -        if (dict_get_int32 (this->options, "transport.socket.keepalive-time", +        if (dict_get_int32 (options, "transport.socket.keepalive-time",                              &(priv->keepaliveidle)) != 0)                  priv->keepaliveidle = keepaliveidle;          gf_log (this->name, GF_LOG_DEBUG, "Reconfigued "                  "transport.socket.keepalive-time=%d", priv->keepaliveidle); -        if (dict_get_int32 (this->options, +        if (dict_get_int32 (options,                              "transport.socket.keepalive-interval",                              &(priv->keepaliveintvl)) != 0)                  priv->keepaliveintvl = keepaliveintvl;          gf_log (this->name, GF_LOG_DEBUG, "Reconfigued "                  "transport.socket.keepalive-interval=%d", priv->keepaliveintvl); -        if (dict_get_int32 (this->options, "transport.socket.keepalive-count", +        if (dict_get_int32 (options, "transport.socket.keepalive-count",                              &(priv->keepalivecnt)) != 0)                  priv->keepalivecnt = keepalivecnt;          gf_log (this->name, GF_LOG_DEBUG, "Reconfigued "                  "transport.socket.keepalive-count=%d", priv->keepalivecnt);          optstr = NULL; -        if (dict_get_str (this->options, "tcp-window-size", +        if (dict_get_str (options, "tcp-window-size",                            &optstr) == 0) {                  if (gf_string2uint64 (optstr, &windowsize) != 0) {                          gf_log (this->name, GF_LOG_ERROR, @@ -3914,8 +3914,8 @@ reconfigure (rpc_transport_t *this, dict_t *options)          priv->windowsize = (int)windowsize; -        if (dict_get (this->options, "non-blocking-io")) { -                optstr = data_to_str (dict_get (this->options, +        if (dict_get (options, "non-blocking-io")) { +                optstr = data_to_str (dict_get (options,                                                  "non-blocking-io"));                  if (gf_string2boolean (optstr, &tmp_bool) == -1) {  | 
