summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-15 05:16:48 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-15 04:55:22 -0700
commit28d02d0b216ab2c580b1d3a48a793a312e1a98ae (patch)
treee7fdac64a47ff9e63e4ce1e3aae83066ace18086 /rpc/rpc-transport/socket/src
parent015a9b1f5a83572445171458312a90dbe0e4aca8 (diff)
socket.c: suppress spurious 'dict_get' logs in glusterd debug mode
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1606 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1606
Diffstat (limited to 'rpc/rpc-transport/socket/src')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c10
1 files changed, 8 insertions, 2 deletions
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;