]> git.saurik.com Git - apt.git/commitdiff
Fixed the cps resume problem
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:47 +0000 (16:53 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:47 +0000 (16:53 +0000)
Author: jgg
Date: 1999-05-23 06:47:43 GMT
Fixed the cps resume problem

apt-pkg/acquire-worker.cc
apt-pkg/acquire-worker.h
apt-pkg/acquire.cc
debian/changelog

index 2ec8f1bd8863cbb305207837307514ad546a0c7d..29d5cd9d59cfff960268afbdc23a5f7a2990b355 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire-worker.cc,v 1.21 1999/04/20 05:02:09 jgg Exp $
+// $Id: acquire-worker.cc,v 1.22 1999/05/23 06:47:43 jgg Exp $
 /* ######################################################################
 
    Acquire Worker 
@@ -225,8 +225,9 @@ bool pkgAcquire::Worker::RunMessages()
            CurrentItem = Itm;
            CurrentSize = 0;
            TotalSize = atoi(LookupTag(Message,"Size","0").c_str());
+           ResumePoint = atoi(LookupTag(Message,"Resume-Point","0").c_str());
            Itm->Owner->Start(Message,atoi(LookupTag(Message,"Size","0").c_str()));
-           
+
            if (Log != 0)
               Log->Fetch(*Itm);
 
index aa59774d2a0d6943634323242662c419eed7293d..4c3a666ae2c7b052237bb6a304c41e84f8e70f41 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire-worker.h,v 1.9 1999/01/20 05:11:25 jgg Exp $
+// $Id: acquire-worker.h,v 1.10 1999/05/23 06:47:43 jgg Exp $
 /* ######################################################################
 
    Acquire Worker - Worker process manager
@@ -73,7 +73,8 @@ class pkgAcquire::Worker
    string Status;
    unsigned long CurrentSize;
    unsigned long TotalSize;
-      
+   unsigned long ResumePoint;
+   
    // Load the method and do the startup 
    bool QueueItem(pkgAcquire::Queue::QItem *Item);
    bool Start();
index 07e4fab599ce82712a5fa3199bbf6fbe2e0e800e..724c3cf0513536b0e4191fea8d5456d0c51c9d59 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire.cc,v 1.32 1999/04/07 06:02:56 jgg Exp $
+// $Id: acquire.cc,v 1.33 1999/05/23 06:47:43 jgg Exp $
 /* ######################################################################
 
    Acquire - File Acquiration
@@ -703,7 +703,7 @@ void pkgAcquireStatus::Pulse(pkgAcquire *Owner)
    for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0;
        I = Owner->WorkerStep(I))
       if (I->CurrentItem != 0 && I->CurrentItem->Owner->Complete == false)
-        CurrentBytes += I->CurrentSize;
+        CurrentBytes += I->CurrentSize - I->ResumePoint;
       
    // Normalize the figures and account for unknown size downloads
    if (TotalBytes <= 0)
index 79c6d6c2d864b13c649f8edca62f65ac6a452e58..458a524b99027f730dc1ff70a23e256d36be32cd 100644 (file)
@@ -13,7 +13,8 @@ apt (0.3.6.1) unstable; urgency=low
     Closes: #38127
   * Arranged for an ftp proxy specifing an http server to work. See the
     important note in the sources.list man page.
-    
+  * Accounted for resumed files in the cps calculation. Closes: #36787
+  
  -- Jason Gunthorpe <jgg@debian.org>  Wed, 12 May 1999 09:18:49 -0700
  
 apt (0.3.6) unstable; urgency=low