summaryrefslogtreecommitdiff
path: root/libtac/lib/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtac/lib/connect.c')
-rw-r--r--libtac/lib/connect.c5
1 files changed, 3 insertions, 2 deletions
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 <errno.h>
#ifdef _AIX
- #include <sys/socket.h>
+#include <sys/socket.h>
#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;