summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorIshan Jayawardena <udeshike@gmail.com>2011-07-16 14:08:08 +0530
committerIshan Jayawardena <udeshike@gmail.com>2011-07-16 14:08:08 +0530
commit3efe86af099d5a5d05e2e61a571da864676834c7 (patch)
tree9e49cf64bcec05922a60d28fdf162bf5312e5d9e /apt-pkg/acquire.cc
parentd981326d00730fb1af2ba5428d9d7557d9b05f9a (diff)
fixed some indentation issues
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 43d5b6b52..7596aa956 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -208,7 +208,6 @@ void pkgAcquire::Enqueue(ItemDesc &Item)
for (; I != 0 && I->Name != Name; I = I->Next);
if (I == 0)
{
- //std::cerr << " Creating a new queue for the name: " << Name << std::endl;
I = new Queue(Name,this);
I->Next = Queues;
Queues = I;
@@ -282,7 +281,6 @@ string pkgAcquire::QueueName(string Uri,MethodConfig const *&Config)
pkgAcquire::MethodConfig *pkgAcquire::GetConfig(string Access)
{
// Search for an existing config
- //std::cerr << "pkgAcquire::GetConfig()" << std::endl;
MethodConfig *Conf;
for (Conf = Configs; Conf != 0; Conf = Conf->Next)
if (Conf->Access == Access)
@@ -295,7 +293,6 @@ pkgAcquire::MethodConfig *pkgAcquire::GetConfig(string Access)
Configs = Conf;
// Create the worker to fetch the configuration
- //std::cerr <<" creating a new worker to fetch the configuration" << std::endl;
Worker Work(Conf);
if (Work.Start() == false)
return 0;
@@ -353,11 +350,9 @@ void pkgAcquire::RunFds(fd_set *RSet,fd_set *WSet)
pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall)
{
Running = true;
- //std::cerr << "pkgAcquire::Run(): Running." << std::endl;
- //std::cerr << " starting up the queues." << std::endl;
+
for (Queue *I = Queues; I != 0; I = I->Next)
I->Startup();
- //std::cerr << "\npkgAcquire::Run(): started queues.\n" << std::endl;
if (Log != 0)
Log->Start();
@@ -646,6 +641,7 @@ bool pkgAcquire::Queue::Startup()
pkgAcquire::MethodConfig *Cnf = Owner->GetConfig(U.Access);
if (Cnf == 0)
return false;
+
Workers = new Worker(this,Cnf,Owner->Log);
Owner->Add(Workers);
if (Workers->Start() == false)
@@ -726,7 +722,6 @@ bool pkgAcquire::Queue::ItemDone(QItem *Itm)
is enabled then it keeps the pipe full. */
bool pkgAcquire::Queue::Cycle()
{
- //std::cerr << "pkgAcquire::Queue::Cycle():" << std::endl;
if (Items == 0 || Workers == 0)
return true;
@@ -744,7 +739,7 @@ bool pkgAcquire::Queue::Cycle()
// Nothing to do, queue is idle.
if (I == 0)
return true;
- //std::cerr << " Found an Item to queue. " << I->ShortDesc << " " << I->URI << std::endl;
+
I->Worker = Workers;
I->Owner->Status = pkgAcquire::Item::StatFetching;
PipeDepth++;
@@ -882,7 +877,6 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
/* We just reset the counters */
void pkgAcquireStatus::Start()
{
- //std::cerr << "pkgAcquireStatus::Start():" << std::endl;
gettimeofday(&Time,0);
gettimeofday(&StartTime,0);
LastBytes = 0;