summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:51 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:51 +0000
commit533151d3ff0e22a91d0e2bcfc0fa225e8843c97f (patch)
tree8dc1efb8c9dab1d481fd7373f0eb07122c7bbd81 /methods/http.cc
parent934b6582b4518630a050c8b84853b8e78ed87905 (diff)
Final rfc2553 changes
Author: jgg Date: 1999-05-26 04:08:39 GMT Final rfc2553 changes
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 0c0acf60f..067d80564 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.31 1999/05/25 05:56:24 jgg Exp $
+// $Id: http.cc,v 1.32 1999/05/26 04:08:39 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -338,10 +338,15 @@ bool ServerState::Open()
LastHost = Host;
LastPort = Port;
}
-
- // Connect to the server
+
+ // Get the printable IP address
+ char Name[NI_MAXHOST];
+ Name[0] = 0;
+ getnameinfo(LastHostAddr->ai_addr,LastHostAddr->ai_addrlen,
+ Name,sizeof(Name),0,0,NI_NUMERICHOST);
+ Owner->Status("Connecting to %s (%s)",Host.c_str(),Name);
+
// Get a socket
-// Owner->Status("Connecting to %s (%s)",Host.c_str(),inet_ntoa(LastHostA));
if ((ServerFd = socket(LastHostAddr->ai_family,LastHostAddr->ai_socktype,
LastHostAddr->ai_protocol)) < 0)
return _error->Errno("socket","Could not create a socket");