Re: Patch: load summary on processing folder-tracking-changed



On Tue, 2009-07-21 at 17:29 +0200, José Dapena Paz wrote:

It looks like you missed a g_static_rec_mutex_unlock in case of success

> -       if (priv->folder && priv->folder_changed_id && priv->loaded)
> -               return;
> -
> -       if (!priv->handle_changes)
> +       g_static_rec_mutex_lock (priv->folder_lock);
> +       if (priv->folder && priv->folder_changed_id && priv->loaded) {
> +               g_static_rec_mutex_unlock (priv->folder_lock);
>                 return;
> +       }
>  
> -       if (!g_static_rec_mutex_trylock (priv->folder_lock)) {
> +       _tny_camel_folder_reason (priv);
> +       if (!load_folder_no_lock (priv)) {
>                 g_static_rec_mutex_unlock (priv->folder_lock);
>                 return;
>         }
>  
> -       /* Update message counts */
> -       priv->cached_length = (guint) camel_folder_get_message_count
> (camel_folder);
> -       priv->unread_length = (guint)
> camel_folder_get_unread_message_count (camel_folder);
> -       change = tny_folder_change_new (TNY_FOLDER (self));
> -
> -       /* Update iter */
> -       update_iter_counts (priv);
> -       g_static_rec_mutex_unlock (priv->folder_lock);
> -
> -       tny_folder_change_set_new_unread_count (change,
> priv->unread_length);
> -       tny_folder_change_set_new_all_count (change,
> priv->cached_length);
> -       priv->dont_fkill = TRUE;
> -       notify_folder_observers_about_in_idle (TNY_FOLDER (self),
> change,
> -
> TNY_FOLDER_PRIV_GET_SESSION (priv));
> -       g_object_unref (change);
> -       priv->dont_fkill = old;
> +       folder_changed (camel_folder, info, priv);
> +       _tny_camel_folder_unreason (priv);
>  
>         return;
>  }
> 
-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]