// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.41 1999/12/09 03:45:56 jgg Exp $
+// $Id: http.cc,v 1.42 1999/12/10 08:53:43 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
ToFile == false))
return false;
- fd_set rfds,wfds,efds;
+ fd_set rfds,wfds;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
- FD_ZERO(&efds);
// Add the server
if (Srv->Out.WriteSpace() == true && Srv->ServerFd != -1)
// Add stdin
FD_SET(STDIN_FILENO,&rfds);
- // Error Set
- if (FileFD != -1)
- FD_SET(FileFD,&efds);
- if (Srv->ServerFd != -1)
- FD_SET(Srv->ServerFd,&efds);
-
// Figure out the max fd
int MaxFd = FileFD;
if (MaxFd < Srv->ServerFd)
tv.tv_sec = TimeOut;
tv.tv_usec = 0;
int Res = 0;
- if ((Res = select(MaxFd+1,&rfds,&wfds,&efds,&tv)) < 0)
+ if ((Res = select(MaxFd+1,&rfds,&wfds,0,&tv)) < 0)
return _error->Errno("select","Select failed");
if (Res == 0)
return ServerDie(Srv);
}
- // Some kind of exception (error) on the sockets, die
- if ((FileFD != -1 && FD_ISSET(FileFD,&efds)) ||
- (Srv->ServerFd != -1 && FD_ISSET(Srv->ServerFd,&efds)))
- return _error->Error("Socket Exception");
-
// Handle server IO
if (Srv->ServerFd != -1 && FD_ISSET(Srv->ServerFd,&rfds))
{
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: rfc2553emu.cc,v 1.4 1999/12/09 03:45:56 jgg Exp $
+// $Id: rfc2553emu.cc,v 1.5 1999/12/10 08:53:43 jgg Exp $
/* ######################################################################
RFC 2553 Emulation - Provides emulation for RFC 2553 getaddrinfo,
const struct addrinfo *hints,
struct addrinfo **res)
{
- struct addrinfo **Result;
+ struct addrinfo **Result = res;
hostent *Addr;
unsigned int Port;
int Proto;