// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.62 1999/06/04 02:31:37 jgg Exp $
+// $Id: apt-get.cc,v 1.63 1999/06/05 07:30:18 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
if (_config->FindB("APT::Get::Download-Only",false) == true)
{
- if (Failed == false && _config->FindB("APT::Get::Fix-Missing",false) == false)
+ if (Failed == true && _config->FindB("APT::Get::Fix-Missing",false) == false)
return _error->Error("Some files failed to download");
return true;
}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.34 1999/05/29 03:25:03 jgg Exp $
+// $Id: http.cc,v 1.35 1999/06/05 07:30:18 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
bool HttpMethod::Go(bool ToFile,ServerState *Srv)
{
// Server has closed the connection
- if (Srv->ServerFd == -1 && Srv->In.WriteSpace() == false)
+ if (Srv->ServerFd == -1 && (Srv->In.WriteSpace() == false ||
+ ToFile == false))
return false;
fd_set rfds,wfds,efds;
int MaxFd = FileFD;
if (MaxFd < Srv->ServerFd)
MaxFd = Srv->ServerFd;
-
+
// Select
struct timeval tv;
tv.tv_sec = TimeOut;
if (FailCounter >= 2)
{
- Fail("Connection timed out",true);
+ Fail("Connection failed",true);
FailCounter = 0;
}