Set socket_error to errno if connecting fails in rfc2553_connect_to()
authorFabian Keil <fk@fabiankeil.de>
Sat, 30 Jul 2011 15:12:02 +0000 (15:12 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sat, 30 Jul 2011 15:12:02 +0000 (15:12 +0000)
Previously rejected direct connections could be incorrectly reported as DNS issues.

jbsockets.c

index 13d4282..265771f 100644 (file)
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.106 2011/07/17 13:36:27 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.107 2011/07/17 13:36:48 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -313,6 +313,7 @@ static jb_socket rfc2553_connect_to(const char *host, int portnum, struct client
 
          if (errno != EINTR)
          {
+            socket_error = errno;
             close_socket(fd);
             connect_failed = 1;
             break;