Pārlūkot izejas kodu

* PulseIntervall can be configured now to make frontends like synaptic hayppy. it's done in a way that does not break binary compatibility

Michael Vogt 21 gadi atpakaļ
vecāks
revīzija
1c5f7e5fc5
3 mainītis faili ar 6 papildinājumiem un 5 dzēšanām
  1. 3 3
      apt-pkg/acquire.cc
  2. 2 1
      apt-pkg/acquire.h
  3. 1 1
      po/apt-all.pot

+ 3 - 3
apt-pkg/acquire.cc

@@ -312,7 +312,7 @@ void pkgAcquire::RunFds(fd_set *RSet,fd_set *WSet)
 /* This runs the queues. It manages a select loop for all of the
 /* This runs the queues. It manages a select loop for all of the
    Worker tasks. The workers interact with the queues and items to
    Worker tasks. The workers interact with the queues and items to
    manage the actual fetch. */
    manage the actual fetch. */
-pkgAcquire::RunResult pkgAcquire::Run()
+pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall)
 {
 {
    Running = true;
    Running = true;
    
    
@@ -327,7 +327,7 @@ pkgAcquire::RunResult pkgAcquire::Run()
    // Run till all things have been acquired
    // Run till all things have been acquired
    struct timeval tv;
    struct timeval tv;
    tv.tv_sec = 0;
    tv.tv_sec = 0;
-   tv.tv_usec = 500000; 
+   tv.tv_usec = PulseIntervall; 
    while (ToFetch > 0)
    while (ToFetch > 0)
    {
    {
       fd_set RFds;
       fd_set RFds;
@@ -357,7 +357,7 @@ pkgAcquire::RunResult pkgAcquire::Run()
       // Timeout, notify the log class
       // Timeout, notify the log class
       if (Res == 0 || (Log != 0 && Log->Update == true))
       if (Res == 0 || (Log != 0 && Log->Update == true))
       {
       {
-	 tv.tv_usec = 500000;
+	 tv.tv_usec = PulseIntervall;
 	 for (Worker *I = Workers; I != 0; I = I->NextAcquire)
 	 for (Worker *I = Workers; I != 0; I = I->NextAcquire)
 	    I->Pulse();
 	    I->Pulse();
 	 if (Log != 0 && Log->Pulse(this) == false)
 	 if (Log != 0 && Log->Pulse(this) == false)

+ 2 - 1
apt-pkg/acquire.h

@@ -100,7 +100,8 @@ class pkgAcquire
 
 
    enum RunResult {Continue,Failed,Cancelled};
    enum RunResult {Continue,Failed,Cancelled};
 
 
-   RunResult Run();
+   RunResult Run() { return Run(500000); }; // Binary compatibility
+   RunResult Run(int PulseIntervall);
    void Shutdown();
    void Shutdown();
    
    
    // Simple iteration mechanism
    // Simple iteration mechanism

+ 1 - 1
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-02-09 12:51+0100\n"
+"POT-Creation-Date: 2005-02-11 00:08+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"