summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:18 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:18 +0000
commit6b1ff003a4acd2914dd395b651c485fb352e3d1a (patch)
treeac0b53eca20edab2d4f5dff7aa22411a2f8f0963 /apt-pkg/acquire.cc
parenta9a5908db9fa6ee108fb23f516b422aa9ca47120 (diff)
Checked the size of partial files #33705
Author: jgg Date: 1999-03-27 03:02:38 GMT Checked the size of partial files #33705
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 221276597..2e8a05e2c 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.30 1999/03/16 07:28:45 jgg Exp $
+// $Id: acquire.cc,v 1.31 1999/03/27 03:02:38 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -420,6 +420,18 @@ unsigned long pkgAcquire::FetchNeeded()
return Total;
}
/*}}}*/
+// Acquire::PartialPresent - Number of partial bytes we already have /*{{{*/
+// ---------------------------------------------------------------------
+/* This is the number of bytes that is not local */
+unsigned long pkgAcquire::PartialPresent()
+{
+ unsigned long Total = 0;
+ for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++)
+ if ((*I)->Local == false)
+ Total += (*I)->PartialSize;
+ return Total;
+}
+ /*}}}*/
// pkgAcquire::UriBegin - Start iterator for the uri list /*{{{*/
// ---------------------------------------------------------------------
/* */