Changeset 3100

Show
Ignore:
Timestamp:
12/11/07 19:58:31
Author:
pvanhoof
Message:

2007-12-11 Philip Van Hoof <pvanhoof@gnome.org>

        • Repeated the bugfix of Sergio to the other locations where the same

technique was wrongfully used.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3099 r3100  
     12007-12-11  Philip Van Hoof <pvanhoof@gnome.org> 
     2 
     3        * Repeated the bugfix of Sergio to the other locations where the same 
     4        technique was wrongfully used. 
     5 
    162007-12-11  Milko Krachounov <milko@3mhz.net> 
    27 
  • trunk/libtinymail-camel/tny-camel-folder.c

    r3097 r3100  
    124124        TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 
    125125        TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (priv->account); 
    126         GList *list
     126        GList *list, *list_iter
    127127 
    128128        g_static_rec_mutex_lock (priv->obs_lock); 
     
    132132        } 
    133133        list = g_list_copy (priv->sobs); 
     134        list_iter = list; 
    134135        g_static_rec_mutex_unlock (priv->obs_lock); 
    135136 
    136         while (list
    137         { 
    138                 TnyFolderStoreObserver *observer = TNY_FOLDER_STORE_OBSERVER (list->data); 
     137        while (list_iter
     138        { 
     139                TnyFolderStoreObserver *observer = TNY_FOLDER_STORE_OBSERVER (list_iter->data); 
    139140                tny_lockable_lock (apriv->session->priv->ui_lock); 
    140141                tny_folder_store_observer_update (observer, change); 
    141142                tny_lockable_unlock (apriv->session->priv->ui_lock); 
    142                 list = g_list_next (list); 
     143                list_iter = g_list_next (list_iter); 
    143144        } 
    144145 
     
    196197                list_iter = g_list_next (list_iter); 
    197198        } 
     199 
    198200        g_list_free (list); 
    199201 
     
    230232        TnyCamelStoreAccountPriv *priv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self); 
    231233        TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 
    232         GList *list = NULL
     234        GList *list = NULL, *list_iter
    233235 
    234236        g_static_rec_mutex_lock (priv->obs_lock); 
     
    238240        } 
    239241        list = g_list_copy (priv->sobs); 
     242        list_iter = list; 
    240243        g_static_rec_mutex_unlock (priv->obs_lock); 
    241244 
    242         while (list
    243         { 
    244                 TnyFolderStoreObserver *observer = TNY_FOLDER_STORE_OBSERVER (list->data); 
     245        while (list_iter
     246        { 
     247                TnyFolderStoreObserver *observer = TNY_FOLDER_STORE_OBSERVER (list_iter->data); 
    245248                tny_lockable_lock (apriv->session->priv->ui_lock); 
    246249                tny_folder_store_observer_update (observer, change); 
    247250                tny_lockable_unlock (apriv->session->priv->ui_lock); 
    248                 list = g_list_next (list); 
    249         } 
     251                list_iter = g_list_next (list_iter); 
     252        } 
     253 
    250254        g_list_free (list); 
    251255 
  • trunk/libtinymail-camel/tny-camel-store-account.c

    r3098 r3100  
    8888{ 
    8989        TnyCamelAccountPriv *apriv = NULL; 
    90         GList *list = NULL
     90        GList *list = NULL, *list_iter
    9191 
    9292        GStaticRecMutex *obs_lock; 
     
    115115        } 
    116116        list = g_list_copy (sobs); 
     117        list_iter = list; 
    117118        g_static_rec_mutex_unlock (obs_lock); 
    118119 
    119         while (list
    120         { 
    121                 TnyFolderStoreObserver *observer = TNY_FOLDER_STORE_OBSERVER (list->data); 
     120        while (list_iter
     121        { 
     122                TnyFolderStoreObserver *observer = TNY_FOLDER_STORE_OBSERVER (list_iter->data); 
    122123                tny_lockable_lock (apriv->session->priv->ui_lock); 
    123124                tny_folder_store_observer_update (observer, change); 
    124125                tny_lockable_unlock (apriv->session->priv->ui_lock); 
    125                 list = g_list_next (list); 
    126         } 
     126                list_iter = g_list_next (list_iter); 
     127        } 
     128 
    127129        g_list_free (list); 
    128130 
  • trunk/libtinymail/tny-merge-folder.c

    r3042 r3100  
    5353        TnyMergeFolderPriv *priv = TNY_MERGE_FOLDER_GET_PRIVATE (self); 
    5454        TnyIterator *iter; 
    55         GList *list
     55        GList *list, *list_iter
    5656 
    5757        g_static_rec_mutex_lock (priv->lock); 
     
    6161        } 
    6262        list = g_list_copy (priv->obs); 
    63         g_static_rec_mutex_unlock (priv->lock); 
    64  
    65  
    66         while (list) 
    67         { 
    68                 TnyFolderObserver *observer = TNY_FOLDER_OBSERVER (list->data); 
     63        list_iter = list; 
     64        g_static_rec_mutex_unlock (priv->lock); 
     65 
     66 
     67        while (list_iter) 
     68        { 
     69                TnyFolderObserver *observer = TNY_FOLDER_OBSERVER (list_iter->data); 
    6970 
    7071                /* We don't need to hold the ui-lock here, because this is called 
     
    7374 
    7475                tny_folder_observer_update (observer, change); 
    75                 list = g_list_next (list); 
     76                list_iter = g_list_next (list_iter); 
    7677        } 
    7778