summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-08 09:29:21 +0000
committerAnand Avati <avati@gluster.com>2011-06-08 11:17:24 -0700
commit2b53a40350afa4dd9e0d77502700cdee0299766c (patch)
tree89e7a9455b46431b56c498ba044366a8971d6f5f /rpc
parentd9db06e6ca108cada080de93d3cc25ba2b14becb (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: 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
Diffstat (limited to 'rpc')
-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 7d2bfc0ad74..d27beaf1c25 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"));