]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
* added gpgv::Options to configure-index
[apt.git] / apt-pkg / acquire.cc
index ae3ba2e01caf46287274c9f4a8149a8b875fd086..3c207fd27b629210c0b83af4c51e0a68147ce055 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire.cc,v 1.48 2001/05/22 04:17:18 jgg Exp $
+// $Id: acquire.cc,v 1.50 2004/03/17 05:17:11 mdz Exp $
 /* ######################################################################
 
    Acquire - File Acquiration
@@ -87,7 +87,11 @@ pkgAcquire::~pkgAcquire()
 void pkgAcquire::Shutdown()
 {
    while (Items.size() != 0)
+   {
+      if (Items[0]->Status == Item::StatFetching)
+         Items[0]->Status = Item::StatError;
       delete Items[0];
+   }
 
    while (Queues != 0)
    {
@@ -113,13 +117,15 @@ void pkgAcquire::Remove(Item *Itm)
 {
    Dequeue(Itm);
    
-   for (ItemIterator I = Items.begin(); I != Items.end(); I++)
+   for (ItemIterator I = Items.begin(); I != Items.end();)
    {
       if (*I == Itm)
       {
         Items.erase(I);
         I = Items.begin();
       }      
+      else 
+        I++;
    }
 }
                                                                        /*}}}*/
@@ -475,7 +481,7 @@ double pkgAcquire::PartialPresent()
         Total += (*I)->PartialSize;
    return Total;
 }
-                                                                       /*}}}*/
+
 // Acquire::UriBegin - Start iterator for the uri list                 /*{{{*/
 // ---------------------------------------------------------------------
 /* */