From 28d02d0b216ab2c580b1d3a48a793a312e1a98ae Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 15 Sep 2010 05:16:48 +0000 Subject: socket.c: suppress spurious 'dict_get' logs in glusterd debug mode Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1606 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1606 --- rpc/rpc-transport/socket/src/socket.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index ca3505d730a..0c2d6d8178f 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -2392,9 +2392,16 @@ socket_init (rpc_transport_t *this) priv->sock = -1; priv->idx = -1; priv->connected = -1; + priv->nodelay = 1; + priv->bio = 0; + priv->windowsize = GF_DEFAULT_SOCKET_WINDOW_SIZE; INIT_LIST_HEAD (&priv->ioq); + /* All the below section needs 'this->options' to be present */ + if (!this->options) + goto out; + if (dict_get (this->options, "non-blocking-io")) { optstr = data_to_str (dict_get (this->options, "non-blocking-io")); @@ -2405,7 +2412,6 @@ socket_init (rpc_transport_t *this) " not taking any action"); tmp_bool = 1; } - priv->bio = 0; if (!tmp_bool) { priv->bio = 1; gf_log (this->name, GF_LOG_WARNING, @@ -2416,7 +2422,6 @@ socket_init (rpc_transport_t *this) optstr = NULL; // By default, we enable NODELAY - priv->nodelay = 1; if (dict_get (this->options, "transport.socket.nodelay")) { optstr = data_to_str (dict_get (this->options, "transport.socket.nodelay")); @@ -2453,6 +2458,7 @@ socket_init (rpc_transport_t *this) } priv->windowsize = (int)windowsize; +out: this->private = priv; return 0; -- cgit