[Pidgin] #8875: Patch for batching multi-second timeouts using purple_timeout_add_seconds in libpurple

Pidgin trac at pidgin.im
Fri Apr 3 03:50:05 EDT 2009


#8875: Patch for batching multi-second timeouts using purple_timeout_add_seconds
in libpurple
------------------------+---------------------------------------------------
 Reporter:  arunanbala  |        Owner:           
     Type:  patch       |       Status:  new      
Milestone:              |    Component:  libpurple
  Version:  2.5.5       |   Resolution:           
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by arunanbala):

 Two things to note:

 1) in libpurple/protocols/msnp9/slp.c I changed the timeout from 2s to 3s;
 I did this as I my reading of the API doc suggests the timeout can fire
 upto 1s before or after the time when using g_timeout_add_seconds. I'm not
 100% sure on this though.

 2) libpurple/protocols/simple/simple.c has three timeouts which I was
 unsure about changing, hence have not been in this patch. One is 2.5s (at
 line 1804) which looked like it could be rounded up to 3s. The other two
 at lines 1766 & 1805 both explicitly add a random ms delay tpo a 10s
 timeout. Changing to timeout_add_seconds would effectively add a random
 delay the first time those timeouts fire, but they would be at regular 10s
 intervals after that. Could the relevant protocol expert let me know if
 those could all be changed as well?

-- 
Ticket URL: <http://developer.pidgin.im/ticket/8875#comment:1>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list