From 78271681be442cdd06c015dca23b913b809e2e86 Mon Sep 17 00:00:00 2001 From: Jeroen Nijhof Date: Tue, 2 Oct 2012 13:28:14 +0200 Subject: errno = 0 on AIX with non-blocking IO, we need to fix this in a better way --- libtac/lib/connect.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libtac/lib') diff --git a/libtac/lib/connect.c b/libtac/lib/connect.c index 40a6d86..d6d699e 100644 --- a/libtac/lib/connect.c +++ b/libtac/lib/connect.c @@ -26,7 +26,7 @@ #include #ifdef _AIX - #include +#include #endif #include "libtac.h" @@ -101,7 +101,8 @@ int tac_connect_single(struct addrinfo *server, char *key) { } rc = connect(fd, server->ai_addr, server->ai_addrlen); - if((rc == -1) && (errno != EINPROGRESS)) { + /* FIX this..for some reason errno = 0 on AIX... */ + if((rc == -1) && (errno != EINPROGRESS) && (errno != 0)) { TACSYSLOG((LOG_ERR,\ "%s: connection to %s failed: %m", __FUNCTION__, ip)) return LIBTAC_STATUS_CONN_ERR; -- cgit v1.2.3