summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:55:30 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:55:30 +0000
commitd955fe80937173f6e4c609ae58a916b61137583d (patch)
treef660e933b24c17e88f94f2ccac0fa5d446dc42cb
parentf332b62bd4fb8e2901c42d03d16a5a3ac500ed5a (diff)
Bug fixes
Author: jgg Date: 1999-12-10 08:53:43 GMT Bug fixes
-rw-r--r--methods/http.cc18
-rw-r--r--methods/rfc2553emu.cc4
2 files changed, 5 insertions, 17 deletions
diff --git a/methods/http.cc b/methods/http.cc
index ee0d75ef8..536a23b67 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- 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.
@@ -671,10 +671,9 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
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)
@@ -693,12 +692,6 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
// 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)
@@ -709,7 +702,7 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
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)
@@ -718,11 +711,6 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
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))
{
diff --git a/methods/rfc2553emu.cc b/methods/rfc2553emu.cc
index e363c68e2..90443f835 100644
--- a/methods/rfc2553emu.cc
+++ b/methods/rfc2553emu.cc
@@ -1,6 +1,6 @@
// -*- 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,
@@ -28,7 +28,7 @@ int getaddrinfo(const char *nodename, const char *servname,
const struct addrinfo *hints,
struct addrinfo **res)
{
- struct addrinfo **Result;
+ struct addrinfo **Result = res;
hostent *Addr;
unsigned int Port;
int Proto;