Changeset 3799

Show
Ignore:
Timestamp:
11/10/08 13:56:11
Author:
jdapena
Message:

* Specify with defines the IDLE tick time (time between iterations in

idle loop) and IDLE default delay (time between IDLE/DONE cycles if no
event happens).
* Fix the IDLE delay account parameter to take into account the tick
time

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/modest/diablo-pe2/ChangeLog

    r3782 r3799  
     12008-11-10  Jose Dapena Paz  <jdapena@igalia.com> 
     2 
     3        * Specify with defines the IDLE tick time (time between iterations in 
     4        idle loop) and IDLE default delay (time between IDLE/DONE cycles if no 
     5        event happens). 
     6 
     7        * Fix the IDLE delay account parameter to take into account the tick 
     8        time 
     9 
    1102008-10-20  Sergio Villar Senin  <svillar@igalia.com> 
    211 
  • releases/modest/diablo-pe2/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c

    r3722 r3799  
    41504150 
    41514151                if (my_cont) 
    4152                         usleep (500000); 
     4152                        usleep (IDLE_TICK_TIME); 
    41534153 
    41544154                cnt++; 
  • releases/modest/diablo-pe2/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store-priv.h

    r3647 r3799  
    2828G_BEGIN_DECLS 
    2929 
     30/* This is the tick time for IDLE loop, the time we sleep in microseconds */ 
     31#define IDLE_TICK_TIME 500000 
     32 
     33/* Default sleep time in seconds for IDLE for sending DONE and IDLE again to avoid 
     34 * TCP timeouts. As IMAP recommends 30 minutes, and we get some processing between 
     35 * each tick, we set 28 minutes */ 
     36#define IDLE_DEFAULT_SLEEP_TIME 28*60 
     37 
    3038void _camel_imap_store_current_folder_finalize (CamelObject *stream, gpointer event_data, gpointer user_data); 
    3139void _camel_imap_store_old_folder_finalize (CamelObject *stream, gpointer event_data, gpointer user_data); 
  • releases/modest/diablo-pe2/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c

    r3780 r3799  
    489489 
    490490        imap_store->idle_sleep_set = FALSE; 
    491         imap_store->idle_sleep = 810; /* default of 27m */ 
     491        imap_store->idle_sleep = IDLE_DEFAULT_SLEEP_TIME * (1000000/IDLE_TICK_TIME); 
    492492        imap_store->getsrv_sleep = 100; /* default of 100s */ 
    493493 
     
    13571357                camel_exception_clear (ex); 
    13581358 
     1359        /* idle_delay is in seconds, so we have to adjust it to the tick */ 
    13591360        if ((idle_sleep = camel_url_get_param (service->url, "idle_delay"))) 
    13601361        { 
    13611362                int tmp = atoi (idle_sleep); 
    13621363                if (tmp != -1) { 
    1363                         CAMEL_IMAP_STORE (service)->idle_sleep = tmp
     1364                        CAMEL_IMAP_STORE (service)->idle_sleep = tmp * (1000000 / IDLE_TICK_TIME)
    13641365                        CAMEL_IMAP_STORE (service)->idle_sleep_set = TRUE; 
    13651366                } 
  • releases/modest/diablo-pe2/libtinymail-camel/tny-camel-account.c

    r3727 r3799  
    472472 * E-mail and expunge events, although it will cause a little bit more continuous 
    473473 * bandwidth consumption (each delayth second). For example idle_delay=20. The 
    474  * defualt value is 20
     474 * defualt value is 28 minutes
    475475 * 
    476476 * Another option is getsrv_delay, also for IMAP accounts, which allows you to