summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-17 06:10:19 +0000
committerAnand Avati <avati@gluster.com>2011-06-19 02:16:23 -0700
commit9d9e67f7e7749141b6b616c34208386799a2dcc2 (patch)
tree49d8041906d214db799259609b091970a7261ac3
parent8711a4f9dbc89cf13f10df7fffb64a9ef715fe15 (diff)
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 <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 633f57db5..c70c84a32 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -331,6 +331,7 @@ __rdma_disconnect (rpc_transport_t *this)
strerror (errno));
ret = -errno;
priv->tcp_connected = 0;
+ priv->connected = 0;
}
}
@@ -4516,10 +4517,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"));