Index: lib/connect.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/connect.c,v
retrieving revision 1.113
diff -u -r1.113 connect.c
--- lib/connect.c	4 Jul 2004 21:48:54 -0000	1.113
+++ lib/connect.c	4 Aug 2004 05:53:32 -0000
@@ -432,7 +432,6 @@
    more address exists */
 static bool trynextip(struct connectdata *conn,
                       int sockindex,
-                      long timeout,
                       bool *connected)
 {
   curl_socket_t sockfd;
@@ -441,13 +440,15 @@
   if(sockindex != FIRSTSOCKET)
     return TRUE; /* no next */
 
+  /* try the next address */
   ai = conn->ip_addr->ai_next;
 
   while (ai) {
-    sockfd = singleipconnect(conn, ai, timeout, connected);
+    sockfd = singleipconnect(conn, ai, 0L, connected);
     if(sockfd != CURL_SOCKET_BAD) {
       /* store the new socket descriptor */
       conn->sock[sockindex] = sockfd;
+      conn->ip_addr = ai;
       return FALSE;
     }
     ai = ai->ai_next;
@@ -514,14 +515,14 @@
     }
     /* nope, not connected for real */
     infof(data, "Connection failed\n");
-    if(trynextip(conn, sockindex, allow-has_passed, connected)) {
+    if(trynextip(conn, sockindex, connected)) {
       code = CURLE_COULDNT_CONNECT;
     }
   }
   else if(WAITCONN_TIMEOUT != rc) {
     /* nope, not connected  */
     infof(data, "Connection failed\n");
-    if(trynextip(conn, sockindex, allow-has_passed, connected)) {
+    if(trynextip(conn, sockindex, connected)) {
       int error = Curl_ourerrno();
       failf(data, "Failed connect to %s:%d; %s",
             conn->host.name, conn->port, Curl_strerror(conn,error));
