From 2168729011a0e835a8bdbde9cae7aaddd78a414d Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Mon, 29 May 2017 16:19:40 +0530 Subject: 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 Change-Id: Iac5ad4382fe630806af14c99bb7950a288756a87 BUG: 1456405 Signed-off-by: Mohammed Rafi KC Reviewed-on: https://review.gluster.org/17412 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- rpc/rpc-transport/socket/src/socket.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index d59dd6cf49f..f5062fb026c 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3869,7 +3869,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, @@ -3886,33 +3886,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, @@ -3923,8 +3923,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) { -- cgit