summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:52 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:52 +0000
commitb3e53cecf4e761ff9d9b0a139ca71f0d67848041 (patch)
tree1859e486a1f5775a13a2b7995a75580e0d280f30 /methods/http.cc
parente3c4391992c1a2670b79c504ec7b3137aa719d57 (diff)
Updated error messages to reflect host/ip
Author: jgg Date: 1999-05-28 07:04:45 GMT Updated error messages to reflect host/ip
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 067d80564..4e659ccd6 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.32 1999/05/26 04:08:39 jgg Exp $
+// $Id: http.cc,v 1.33 1999/05/28 07:04:45 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -353,18 +353,20 @@ bool ServerState::Open()
SetNonBlock(ServerFd,true);
if (connect(ServerFd,LastHostAddr->ai_addr,LastHostAddr->ai_addrlen) < 0 &&
errno != EINPROGRESS)
- return _error->Errno("connect","Connect initiate the connection");
+ return _error->Errno("connect","Cannot initiate the connection "
+ "to %s (%s).",Host.c_str(),Name);
/* This implements a timeout for connect by opening the connection
nonblocking */
if (WaitFd(ServerFd,true,TimeOut) == false)
- return _error->Error("Could not connect, connection timed out");
+ return _error->Error("Could not connect to %s (%s), "
+ "connection timed out",Host.c_str(),Name);
unsigned int Err;
unsigned int Len = sizeof(Err);
if (getsockopt(ServerFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
return _error->Errno("getsockopt","Failed");
if (Err != 0)
- return _error->Error("Could not connect.");
+ return _error->Error("Could not connect to %s (%s).",Host.c_str(),Name);
return true;
}