diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-21 18:50:45 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-21 18:50:45 +0400 |
commit | ecc3b51cfdd7aecdb7a02791424d8e8cfcd22453 (patch) | |
tree | 6ae84e113c6c91b0577242aa4c8d4c0bad78214e /src/util.c | |
parent | 1094cced952ce0565dde55c75f318124d0f84f3e (diff) | |
download | rspamd-ecc3b51cfdd7aecdb7a02791424d8e8cfcd22453.tar.gz rspamd-ecc3b51cfdd7aecdb7a02791424d8e8cfcd22453.zip |
* Add http maps support
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |