Changeset 3755

Show
Ignore:
Timestamp:
09/03/08 11:14:48
Author:
svillar
Message:

Merged bugfix from trunk (r3754)

Files:

Legend:

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

    r3729 r3755  
     12008-09-03  Sergio Villar Senin  <svillar@igalia.com> 
     2 
     3        * libtinymail-camel/tny-camel-folder.c 
     4        (tny_camel_folder_get_msg_async_default), 
     5        (tny_camel_folder_find_msg_async_default): 
     6        * libtinymail-camel/tny-camel-queue-priv.h: 
     7        * libtinymail-camel/tny-camel-queue.c (_tny_camel_queue_has_items): 
     8        * libtinymail-camel/tny-camel-store-account.c 
     9        (_tny_camel_store_account_queue_going_online): do not add a 
     10        message retrieval (with both get_msg_async and find_msg_async) to 
     11        the IMAP store account message retrieval queue when there is a 
     12        pending connection in the account queue. 
     13 
    1142008-07-28  Sergio Villar Senin  <svillar@igalia.com> 
    215 
  • releases/modest/diablo-pe2/libtinymail-camel/tny-camel-folder.c

    r3727 r3755  
    26312631        g_object_ref (info->header); 
    26322632 
    2633         if (!TNY_IS_CAMEL_POP_FOLDER (self)) 
     2633        if (!TNY_IS_CAMEL_POP_FOLDER (self) &&  
     2634            !_tny_camel_queue_has_items (TNY_FOLDER_PRIV_GET_QUEUE (priv),  
     2635                                         TNY_CAMEL_QUEUE_RECONNECT_ITEM | TNY_CAMEL_QUEUE_CONNECT_ITEM)) 
    26342636                queue = TNY_FOLDER_PRIV_GET_MSG_QUEUE (priv); 
    26352637        else 
     
    28072809        g_object_ref (info->self); 
    28082810 
    2809         if (!TNY_IS_CAMEL_POP_FOLDER (self)) 
     2811        if (!TNY_IS_CAMEL_POP_FOLDER (self) &&  
     2812            !_tny_camel_queue_has_items (TNY_FOLDER_PRIV_GET_QUEUE (priv),  
     2813                                         TNY_CAMEL_QUEUE_RECONNECT_ITEM | TNY_CAMEL_QUEUE_CONNECT_ITEM)) 
    28102814                queue = TNY_FOLDER_PRIV_GET_MSG_QUEUE (priv); 
    28112815        else 
  • releases/modest/diablo-pe2/libtinymail-camel/tny-camel-queue-priv.h

    r3710 r3755  
    7575        TNY_CAMEL_QUEUE_REFRESH_ITEM = 1<<6, 
    7676        TNY_CAMEL_QUEUE_AUTO_CANCELLABLE_ITEM = 1<<7, 
     77        TNY_CAMEL_QUEUE_CONNECT_ITEM = 1<<8, 
    7778} TnyCamelQueueItemFlags; 
    7879 
     
    8485void _tny_camel_queue_remove_items (TnyCamelQueue *queue, TnyCamelQueueItemFlags flags); 
    8586void _tny_camel_queue_cancel_remove_items (TnyCamelQueue *queue, TnyCamelQueueItemFlags flags); 
     87gboolean _tny_camel_queue_has_items (TnyCamelQueue *queue, TnyCamelQueueItemFlags flags); 
    8688 
    8789G_END_DECLS 
  • releases/modest/diablo-pe2/libtinymail-camel/tny-camel-queue.c

    r3710 r3755  
    487487                cancel_field, data, data_size, TNY_CAMEL_QUEUE_NORMAL_ITEM, name); 
    488488        return; 
     489} 
     490 
     491gboolean  
     492_tny_camel_queue_has_items (TnyCamelQueue *queue, TnyCamelQueueItemFlags flags) 
     493{ 
     494        GList *copy = NULL; 
     495        gboolean retval = FALSE; 
     496 
     497        g_static_rec_mutex_lock (queue->lock); 
     498        copy = queue->list; 
     499        while (copy) 
     500        { 
     501                QueueItem *item = copy->data; 
     502 
     503                if (item && (item->flags & flags))  
     504                { 
     505                        tny_debug ("TnyCamelQueue: %s found\n", item->name); 
     506                        retval = TRUE; 
     507                        break; 
     508                } 
     509                 
     510                copy = g_list_next (copy); 
     511        } 
     512        g_static_rec_mutex_unlock (queue->lock); 
     513 
     514        return retval; 
    489515} 
    490516 
  • releases/modest/diablo-pe2/libtinymail-camel/tny-camel-store-account.c

    r3710 r3755  
    20462046                NULL, 
    20472047                info, sizeof (GoingOnlineInfo), 
    2048                 TNY_CAMEL_QUEUE_RECONNECT_ITEM|TNY_CAMEL_QUEUE_CANCELLABLE_ITEM, 
     2048                TNY_CAMEL_QUEUE_CONNECT_ITEM|TNY_CAMEL_QUEUE_CANCELLABLE_ITEM, 
    20492049                __FUNCTION__); 
    20502050