fixed ftp but, config file bug and md5 source fetch error
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:29 +0000 (16:53 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:29 +0000 (16:53 +0000)
Author: jgg
Date: 1999-04-11 21:23:09 GMT
fixed ftp but, config file bug and md5 source fetch error

apt-pkg/acquire-item.h
doc/examples/apt.conf
methods/ftp.cc

index 205537e..3079c68 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire-item.h,v 1.18 1999/04/07 05:30:17 jgg Exp $
+// $Id: acquire-item.h,v 1.19 1999/04/11 21:23:09 jgg Exp $
 /* ######################################################################
 
    Acquire Item - Item to acquire
@@ -154,6 +154,7 @@ class pkgAcqFile : public pkgAcquire::Item
    
    // Specialized action members
    virtual void Done(string Message,unsigned long Size,string Md5Hash);
+   virtual string MD5Sum() {return MD5;};
    virtual string DescURI() {return Desc.URI;};
    
    pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size,
index 9c617c9..9342673 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: apt.conf,v 1.30 1999/04/11 06:46:09 jgg Exp $
+// $Id: apt.conf,v 1.31 1999/04/11 21:23:10 jgg Exp $
 /* This file is an index of all APT configuration directives. It should
    NOT actually be used as a real config file, though it is a completely
    valid file.
@@ -48,7 +48,7 @@ APT
   };
 
   // Some general options
-  Ingore-Hold "false";
+  Ignore-Hold "false";
   Immediate-Configure "true";      // DO NOT turn this off, see the man page
 };
 
index 09fbaeb..145858f 100644 (file)
@@ -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();