diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:29 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:29 +0000 |
commit | 2e90f6e004d937ad07fbd0cae59f321aea43a80f (patch) | |
tree | 6617073852b39dc57379529865dd065b92743527 /methods | |
parent | 536976170fe01c9637af246302ab7b589993788e (diff) |
fixed ftp but, config file bug and md5 source fetch error
Author: jgg
Date: 1999-04-11 21:23:09 GMT
fixed ftp but, config file bug and md5 source fetch error
Diffstat (limited to 'methods')
-rw-r--r-- | methods/ftp.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/methods/ftp.cc b/methods/ftp.cc index 09fbaeb7f..145858f1f 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: ftp.cc,v 1.5 1999/03/15 19:51:27 jgg Exp $ +// $Id: ftp.cc,v 1.6 1999/04/11 21:23:10 jgg Exp $ /* ###################################################################### HTTP Aquire Method - This is the FTP aquire method for APT. @@ -286,6 +286,9 @@ bool FTPConn::Login() /* This performs a very simple buffered read. */ bool FTPConn::ReadLine(string &Text) { + if (ServerFd == -1) + return false; + // Suck in a line while (Len < sizeof(Buffer)) { @@ -315,7 +318,7 @@ bool FTPConn::ReadLine(string &Text) } // Suck it back - int Res = read(ServerFd,Buffer,sizeof(Buffer) - Len); + int Res = read(ServerFd,Buffer + Len,sizeof(Buffer) - Len); if (Res <= 0) { Close(); |