Changeset 3828

Show
Ignore:
Timestamp:
11/26/08 15:53:00
Author:
jdapena
Message:

* Bugfix when fetching parts and messages (merged r3682 from trunk).

Files:

Legend:

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

    r3813 r3828  
     12008-11-25  Jose Dapena Paz  <jdapena@igalia.com> 
     2 
     3        * (Backported from trunk) Bugfix when fetching parts and messages 
     4 
    152008-11-19  Sergio Villar Senin  <svillar@igalia.com> 
    26 
  • releases/modest/diablo-pe2/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c

    r3827 r3828  
    45634563} 
    45644564 
    4565 static GStaticMutex gmsgstore_lock = G_STATIC_MUTEX_INIT; 
     4565static GStaticRecMutex gmsgstore_lock = G_STATIC_REC_MUTEX_INIT; 
    45664566 
    45674567static gboolean 
     
    45714571        gboolean retval = TRUE; 
    45724572 
    4573         if (g_static_mutex_trylock (&gmsgstore_lock)) 
     4573        if (g_static_rec_mutex_trylock (&gmsgstore_lock)) 
    45744574        { 
    45754575                imap_folder->gmsgstore_ticks--; 
     
    45884588                        retval = FALSE; 
    45894589                } 
    4590                 g_static_mutex_unlock (&gmsgstore_lock); 
     4590                g_static_rec_mutex_unlock (&gmsgstore_lock); 
    45914591        } else 
    45924592                retval = TRUE; 
     
    46034603 
    46044604 
    4605         g_static_mutex_lock (&gmsgstore_lock); /* A */ 
     4605        g_static_rec_mutex_lock (&gmsgstore_lock); /* A */ 
    46064606 
    46074607        if (imap_folder->gmsgstore) { 
     
    46214621                                                " and can't go online to fetch it: %s"), 
    46224622                                                camel_exception_get_description (&tex)); 
    4623                                 g_static_mutex_unlock (&gmsgstore_lock); 
     4623                                g_static_rec_mutex_unlock (&gmsgstore_lock); 
    46244624                                camel_exception_clear (&tex); 
    46254625                                return NULL; 
     
    46404640                        g_critical ("Severe interal error while trying to construct a new connection\n"); 
    46414641                        camel_object_unref (store); 
    4642                         g_static_mutex_unlock (&gmsgstore_lock); 
     4642                        g_static_rec_mutex_unlock (&gmsgstore_lock); 
    46434643                        return NULL; 
    46444644                } 
     
    46624662 
    46634663                        CAMEL_IMAP_FOLDER_REC_UNLOCK (imap_folder, cache_lock); 
    4664                         g_static_mutex_unlock (&gmsgstore_lock); 
     4664                        g_static_rec_mutex_unlock (&gmsgstore_lock); 
    46654665                        return NULL; 
    46664666                } 
     
    46964696        } 
    46974697 
    4698         g_static_mutex_unlock (&gmsgstore_lock); /* A */ 
     4698        g_static_rec_mutex_unlock (&gmsgstore_lock); /* A */ 
    46994699} 
    47004700 
     
    47034703stop_gmsgstore_from_idle (CamelImapFolder *imap_folder) 
    47044704{ 
    4705         g_static_mutex_lock (&gmsgstore_lock); /* A */ 
     4705        g_static_rec_mutex_lock (&gmsgstore_lock); /* A */ 
    47064706        if (imap_folder->gmsgstore) { 
    47074707                imap_folder->gmsgstore->clean_exit = FALSE; 
     
    47114711                        check_gmsgstore_die, imap_folder); 
    47124712        } 
    4713         g_static_mutex_unlock (&gmsgstore_lock); /* A */ 
     4713        g_static_rec_mutex_unlock (&gmsgstore_lock); /* A */ 
    47144714} 
    47154715 
     
    47844784                if (noop_response) 
    47854785                        camel_imap_response_free (store, noop_response); 
    4786                 else  
     4786                else { 
     4787                        stop_gmsgstore (imap_folder, ctchecker, FALSE); 
    47874788                        return NULL; 
    4788  
     4789                } 
     4790                 
    47894791                camel_operation_start (NULL, _("Retrieving converted message part")); 
    47904792 
     
    50425044                if (noop_response) 
    50435045                        camel_imap_response_free (store, noop_response); 
    5044                 else  
     5046                else { 
     5047                        stop_gmsgstore (imap_folder, ctchecker, FALSE); 
    50455048                        return NULL; 
     5049                } 
    50465050 
    50475051                camel_operation_start (NULL, _("Retrieving message part")); 
     
    54755479                        if (noop_response) 
    54765480                                camel_imap_response_free (store, noop_response); 
    5477                         else  
     5481                        else { 
     5482                                stop_gmsgstore (imap_folder, ctchecker, FALSE); 
    54785483                                return NULL; 
    5479  
     5484                        } 
    54805485 
    54815486                        camel_operation_start (NULL, _("Retrieving message bodystructure")); 
     
    55945599        else { 
    55955600                g_message ("%s: NO NOOP RESPONSE -> EXIT", __FUNCTION__); 
     5601                stop_gmsgstore (imap_folder, ctchecker, FALSE); 
    55965602                return NULL; 
    55975603        } 
    55985604        g_message ("%s: END NOOP IMAP COMMAND", __FUNCTION__); 
    5599  
    56005605 
    56015606        camel_operation_start (NULL, _("Retrieving message"));