summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:47 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:47 +0000
commit8b75eb1cadd4db3d6ecb27fa4f441843d3856f77 (patch)
tree90c049839bbb146007f9df15ffde83adb688f244 /apt-pkg
parentd44893223244d859057820954b8dd2e61324ad08 (diff)
Fixed the cps resume problem
Author: jgg Date: 1999-05-23 06:47:43 GMT Fixed the cps resume problem
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-worker.cc5
-rw-r--r--apt-pkg/acquire-worker.h5
-rw-r--r--apt-pkg/acquire.cc4
3 files changed, 8 insertions, 6 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 2ec8f1bd8..29d5cd9d5 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -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);
diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h
index aa59774d2..4c3a666ae 100644
--- a/apt-pkg/acquire-worker.h
+++ b/apt-pkg/acquire-worker.h
@@ -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();
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 07e4fab59..724c3cf05 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -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)