From 2e90f6e004d937ad07fbd0cae59f321aea43a80f Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:53:29 +0000 Subject: 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 --- methods/ftp.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'methods') 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(); -- cgit v1.2.3