~ubuntu-branches/ubuntu/breezy/apt/breezy

« back to all changes in this revision

Viewing changes to apt-pkg/acquire.cc

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2005-03-07 20:08:33 UTC
  • Revision ID: james.westby@ubuntu.com-20050307200833-0lxdgg2cb4oculdv
Tags: 0.6.35
* Merge apt--mvo--0 (incorporates 0.6.34ubuntu1):
  - Implement MaxSize and MaxAge in apt.cron.daily, to prevent the cache
    from growing too large (Ubuntu #6761)
  - some comments about the pkgAcqMetaSig::Custom600Headers() added
  - use gpg --with-colons
  - commented the ftp no_proxy unseting in methods/ftp.cc
  - added support for "Acquire::gpgv::options" in methods/gpgv.cc
* Merge bubulle@debian.org--2005/apt--main--0
  - Make capitalization more consistent
  - Un-fuzzy translations resulting from capitalization changes
  - Italian translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- mode: cpp; mode: fold -*-
2
2
// Description                                                          /*{{{*/
3
 
// $Id: acquire.cc,v 1.49 2001/05/27 04:28:37 jgg Exp $
 
3
// $Id: acquire.cc,v 1.50 2004/03/17 05:17:11 mdz Exp $
4
4
/* ######################################################################
5
5
 
6
6
   Acquire - File Acquiration
87
87
void pkgAcquire::Shutdown()
88
88
{
89
89
   while (Items.size() != 0)
 
90
   {
 
91
      if (Items[0]->Status == Item::StatFetching)
 
92
         Items[0]->Status = Item::StatError;
90
93
      delete Items[0];
 
94
   }
91
95
 
92
96
   while (Queues != 0)
93
97
   {
308
312
/* This runs the queues. It manages a select loop for all of the
309
313
   Worker tasks. The workers interact with the queues and items to
310
314
   manage the actual fetch. */
311
 
pkgAcquire::RunResult pkgAcquire::Run()
 
315
pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall)
312
316
{
313
317
   Running = true;
314
318
   
323
327
   // Run till all things have been acquired
324
328
   struct timeval tv;
325
329
   tv.tv_sec = 0;
326
 
   tv.tv_usec = 500000; 
 
330
   tv.tv_usec = PulseIntervall; 
327
331
   while (ToFetch > 0)
328
332
   {
329
333
      fd_set RFds;
353
357
      // Timeout, notify the log class
354
358
      if (Res == 0 || (Log != 0 && Log->Update == true))
355
359
      {
356
 
         tv.tv_usec = 500000;
 
360
         tv.tv_usec = PulseIntervall;
357
361
         for (Worker *I = Workers; I != 0; I = I->NextAcquire)
358
362
            I->Pulse();
359
363
         if (Log != 0 && Log->Pulse(this) == false)
477
481
         Total += (*I)->PartialSize;
478
482
   return Total;
479
483
}
480
 
                                                                        /*}}}*/
 
484
 
481
485
// Acquire::UriBegin - Start iterator for the uri list                  /*{{{*/
482
486
// ---------------------------------------------------------------------
483
487
/* */