From 2b53a40350afa4dd9e0d77502700cdee0299766c Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 8 Jun 2011 09:29:21 +0000 Subject: rpc-transport/rdma: don't return '0' in case of un-initiated rdma_connect() needed to handle the re-configuration of the port in client protocol. If there is a successful 'connect()' after the query port, the remote-port value gets reset to '0'. In this case, if the connect() return 0 for already connected socket, the query_portmap will keep happening in a loop. Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 2294 (Currently there is no way through cli to make a volume listen on both the transports (socket/rdma)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2294 --- rpc/rpc-transport/rdma/src/rdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'rpc/rpc-transport/rdma') diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index 7d2bfc0a..d27beaf1 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -329,6 +329,7 @@ __rdma_disconnect (rpc_transport_t *this) strerror (errno)); ret = -errno; priv->tcp_connected = 0; + priv->connected = 0; } } @@ -4503,10 +4504,6 @@ rdma_connect (struct rpc_transport *this, int port) struct sockaddr_storage sockaddr; socklen_t sockaddr_len = 0; - if (priv->connected) { - return 0; - } - if (dict_get (options, "non-blocking-io")) { char *nb_connect = data_to_str (dict_get (this->options, "non-blocking-io")); -- cgit