[Pkg-ofed-commits] [libfabric] 24/123: Fallback mechanism for getting src address
Ana Beatriz Guerrero López
ana at moszumanska.debian.org
Sat Oct 22 12:28:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
ana pushed a commit to annotated tag v1.1.1
in repository libfabric.
commit a4a5f0b544f3bb27a26d063e05da64fbe04a69a9
Author: Jithin Jose <jithin.jose at intel.com>
Date: Thu Aug 27 14:29:02 2015 -0700
Fallback mechanism for getting src address
Signed-off-by: Jithin Jose <jithin.jose at intel.com>
---
prov/sockets/src/sock_conn.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/prov/sockets/src/sock_conn.c b/prov/sockets/src/sock_conn.c
index 07758ec..0e33ecd 100644
--- a/prov/sockets/src/sock_conn.c
+++ b/prov/sockets/src/sock_conn.c
@@ -272,8 +272,13 @@ int sock_conn_map_connect(struct sock_ep *ep,
ret = recv(conn_fd, &use_conn, sizeof(use_conn), 0);
} while(ret == -1 && (errno == EAGAIN || errno == EWOULDBLOCK));
if (ret != sizeof(use_conn)) {
- SOCK_LOG_ERROR("Cannot exchange port: %d\n", ret);
- goto err;
+ if (ret == 0) {
+ SOCK_LOG_DBG("Peer reset, use incoming connection\n");
+ use_conn = 0;
+ } else {
+ SOCK_LOG_ERROR("Cannot exchange port: %d\n", ret);
+ goto err;
+ }
}
SOCK_LOG_DBG("Connect response: %d\n", use_conn);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/libfabric.git
More information about the Pkg-ofed-commits
mailing list