pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] More retry/sleep/modem stuff


From: Graham Orr
Subject: [Pan-users] More retry/sleep/modem stuff
Date: 21 Apr 2002 18:14:10 +0100

Hi, 

Excuse the crap posted earlier (and maybe for this crap too :)). The
following code is modified from queue.c. 

==== 

else 
{ 
   if (i==-2) /* connection failure */ 
   { 

      status_item_emit_error (STATUS_ITEM(task), _("Connect Failure")); 

      ++task->tries; 
      if (task->tries > max_tries) 
         queue_task_abort (task); 
      else 
         sleep(5); 
                                            
      queue_wakeup(); 
                                            
   } 

   queue_set_task_status (task, QUEUE_TASK_STATUS_QUEUED); 
} 

=== 

Start downloading a binary, power off the modem. After the socket has
timed out, and with this changed code, Pan will try to restart the task
until it reaches max retries with five second delays between attempts.
Fine... that's basically what I was after. Except that, with multiple
downloads in the queue, the connection attempt passes on to the next
task, and if that can't connect, on to the next task looping until all
tasks reach max retries. The behaviour I'm looking for is for Pan to
retry the task the connection failed on until max retries and then try
the next. Can I get there from here - or are the changes completely
wrong head-up-arse stuff? 

This is a Redhat 7.2 box with the latest Ximian bits installed and the
code I'm working with is Pan-0.11.3. 

-- 
Graham 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]