summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2015-01-08 09:43:50 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-01-15 00:06:34 -0800
commitc4561b6fd90c52667eebec9eecf974b4c0786382 (patch)
treee9df8ca31bd71051adfddde44cc7fec544675469 /rpc/rpc-lib
parente9c90da38e1b6fb7fc4e0d5d1e987c510d1c17d6 (diff)
rpc: initialise transport's list on creation
Initialising the transport's list, meant to hold clients connected to it, on the first connection event is prone to race, especially with the introduction of multi-threaded event layer. BUG: 1181203 Change-Id: I6a20686a2012c1f49a279cc9cd55a03b8c7615fc Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/9413 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c
index cf7f903056a..266d07e99ed 100644
--- a/rpc/rpc-lib/src/rpc-transport.c
+++ b/rpc/rpc-lib/src/rpc-transport.c
@@ -334,6 +334,8 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name)
goto fail;
}
+ INIT_LIST_HEAD (&trans->list);
+
return_trans = trans;
GF_FREE (name);