From ecc3b51cfdd7aecdb7a02791424d8e8cfcd22453 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 21 Jul 2009 18:50:45 +0400 Subject: * Add http maps support --- src/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 8001fcb18..364e1b0a4 100644 --- a/src/util.c +++ b/src/util.c @@ -50,7 +50,7 @@ make_socket_nonblocking (int fd) } int -make_tcp_socket (struct in_addr *addr, u_short port, gboolean is_server) +make_tcp_socket (struct in_addr *addr, u_short port, gboolean is_server, gboolean async) { int fd, r, optlen, on = 1, s_error; int serrno; @@ -63,7 +63,7 @@ make_tcp_socket (struct in_addr *addr, u_short port, gboolean is_server) return -1; } - if (make_socket_nonblocking(fd) < 0) { + if (async && make_socket_nonblocking(fd) < 0) { goto out; } @@ -87,7 +87,7 @@ make_tcp_socket (struct in_addr *addr, u_short port, gboolean is_server) } if (r == -1) { - if (errno != EINPROGRESS) { + if (!async || errno != EINPROGRESS) { msg_warn ("make_tcp_socket: bind/connect failed: %d, '%s'", errno, strerror (errno)); goto out; } -- cgit v1.2.3