Просмотр исходного кода

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

Arch Librarian лет назад: 22
Родитель
Сommit
2e90f6e004
3 измененных файлов с 9 добавлено и 5 удалено
  1. 2 1
      apt-pkg/acquire-item.h
  2. 2 2
      doc/examples/apt.conf
  3. 5 2
      methods/ftp.cc

+ 2 - 1
apt-pkg/acquire-item.h

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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
    Acquire Item - Item to acquire
@@ -154,6 +154,7 @@ class pkgAcqFile : public pkgAcquire::Item
    
    
    // Specialized action members
    // Specialized action members
    virtual void Done(string Message,unsigned long Size,string Md5Hash);
    virtual void Done(string Message,unsigned long Size,string Md5Hash);
+   virtual string MD5Sum() {return MD5;};
    virtual string DescURI() {return Desc.URI;};
    virtual string DescURI() {return Desc.URI;};
    
    
    pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size,
    pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size,

+ 2 - 2
doc/examples/apt.conf

@@ -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
 /* 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
    NOT actually be used as a real config file, though it is a completely
    valid file.
    valid file.
@@ -48,7 +48,7 @@ APT
   };
   };
 
 
   // Some general options
   // Some general options
-  Ingore-Hold "false";
+  Ignore-Hold "false";
   Immediate-Configure "true";      // DO NOT turn this off, see the man page
   Immediate-Configure "true";      // DO NOT turn this off, see the man page
 };
 };
 
 

+ 5 - 2
methods/ftp.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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.
    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. */
 /* This performs a very simple buffered read. */
 bool FTPConn::ReadLine(string &Text)
 bool FTPConn::ReadLine(string &Text)
 {
 {
+   if (ServerFd == -1)
+      return false;
+   
    // Suck in a line
    // Suck in a line
    while (Len < sizeof(Buffer))
    while (Len < sizeof(Buffer))
    {
    {
@@ -315,7 +318,7 @@ bool FTPConn::ReadLine(string &Text)
       }
       }
       
       
       // Suck it back
       // Suck it back
-      int Res = read(ServerFd,Buffer,sizeof(Buffer) - Len);
+      int Res = read(ServerFd,Buffer + Len,sizeof(Buffer) - Len);
       if (Res <= 0)
       if (Res <= 0)
       {
       {
 	 Close();
 	 Close();