]> sjero.net Git - wget/commitdiff
[svn] Fix call to socket_ip_address.
authorhniksic <devnull@localhost>
Sat, 15 Nov 2003 02:03:23 +0000 (18:03 -0800)
committerhniksic <devnull@localhost>
Sat, 15 Nov 2003 02:03:23 +0000 (18:03 -0800)
src/ChangeLog
src/http.c

index 270d937c6dac8b150e9b26351ab2359a0e1fad41..a0127f1049efd32f2b136d260cb0d0b971b3fdc1 100644 (file)
@@ -1,3 +1,13 @@
+2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * http.c (persistent_available_p): Correctly specify the endpoint
+       argument to socket_ip_address.
+       (gethttp): When printing the "reusing connection to..." message,
+       specify the host name of the reused connection, not the current
+       host name.  That makes more sense because it provides a useful
+       piece of information -- we know to which host we're supposed to
+       connect anyway!
+
 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * init.c: Make sure the options are in alphabetic order!
index 71006d122d74901da82daa0a9825454477cdcd4c..d594e8505e946bb0a4fa7cddebc0f2613e77ec7b 100644 (file)
@@ -460,7 +460,7 @@ persistent_available_p (const char *host, int port, int ssl,
         resolves to, pconn.socket is for all intents and purposes
         already talking to HOST.  */
 
-      if (!socket_ip_address (pconn.socket, &ip, 0))
+      if (!socket_ip_address (pconn.socket, &ip, ENDPOINT_PEER))
        {
          /* Can't get the peer's address -- something must be very
             wrong with the connection.  */
@@ -739,10 +739,8 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
     }
   else
     {
-      logprintf (LOG_VERBOSE, _("Reusing connection to %s:%hu.\n"),
-                conn->host, conn->port);
-      /* #### pc_last_fd should be accessed through an accessor
-         function.  */
+      logprintf (LOG_VERBOSE, _("Reusing existing connection to %s:%d.\n"),
+                pconn.host, pconn.port);
       sock = pconn.socket;
       using_ssl = pconn.ssl;
       DEBUGP (("Reusing fd %d.\n", sock));