]> git.saurik.com Git - apt.git/commitdiff
More fixes
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:52:12 +0000 (16:52 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:52:12 +0000 (16:52 +0000)
Author: jgg
Date: 1998-12-11 07:20:32 GMT
More fixes

apt-pkg/acquire.cc
apt-pkg/acquire.h

index e73619530a0732b8a33b214e4133f0ed2023c9ba..ab60d1b47a9bbcec7a9346034faa4883d3b43940 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire.cc,v 1.22 1998/12/11 06:32:35 jgg Exp $
+// $Id: acquire.cc,v 1.23 1998/12/11 07:20:32 jgg Exp $
 /* ######################################################################
 
    Acquire - File Acquiration
@@ -589,9 +589,12 @@ bool pkgAcquire::Queue::Cycle()
    if (Items == 0 || Workers == 0)
       return true;
 
+   if (PipeDepth < 0)
+      return _error->Error("Pipedepth failure");
+                          
    // Look for a queable item
    QItem *I = Items;
-   while (PipeDepth < MaxPipeDepth)
+   while (PipeDepth < (signed)MaxPipeDepth)
    {
       for (; I != 0; I = I->Next)
         if (I->Owner->Status == pkgAcquire::Item::StatIdle)
@@ -603,6 +606,7 @@ bool pkgAcquire::Queue::Cycle()
       
       I->Worker = Workers;
       I->Owner->Status = pkgAcquire::Item::StatFetching;
+      PipeDepth++;
       if (Workers->QueueItem(I) == false)
         return false;
    }
index d6339e74db0e1b25adb7c1b4973a2bd79b4832bf..2f5da7b312e3707714148da07b950bb47f7f4cf3 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire.h,v 1.17 1998/12/11 06:01:27 jgg Exp $
+// $Id: acquire.h,v 1.18 1998/12/11 07:20:33 jgg Exp $
 /* ######################################################################
 
    Acquire - File Acquiration
@@ -149,7 +149,7 @@ class pkgAcquire::Queue
    QItem *Items;
    pkgAcquire::Worker *Workers;
    pkgAcquire *Owner;
-   unsigned long PipeDepth;
+   signed long PipeDepth;
    unsigned long MaxPipeDepth;
    
    public: