From 60978976388e00a611f2aeb87c9b27e67a2b0f05 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 7 Dec 2011 22:27:16 -0500 Subject: mail_folder_cache_note_store: CamelSession arg is unnecessary. The CamelStore argument already has the CamelSession: session = camel_service_get_session (CAMEL_SERVICE (store)); --- mail/e-mail-store.c | 2 +- mail/mail-folder-cache.c | 4 +++- mail/mail-folder-cache.h | 1 - mail/mail-send-recv.c | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) (limited to 'mail') diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c index 2d180fe387..283a8608e9 100644 --- a/mail/e-mail-store.c +++ b/mail/e-mail-store.c @@ -204,7 +204,7 @@ mail_store_add (EMailSession *session, em_folder_tree_model_add_store (default_model, store); mail_folder_cache_note_store ( - folder_cache, CAMEL_SESSION (session), store, NULL, + folder_cache, store, NULL, mail_store_note_store_cb, store_info_ref (store_info)); } diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 88b089edcc..0baaa0eb72 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -1106,12 +1106,12 @@ mail_folder_cache_new (void) */ void mail_folder_cache_note_store (MailFolderCache *cache, - CamelSession *session, CamelStore *store, GCancellable *cancellable, NoteDoneFunc done, gpointer data) { + CamelSession *session; struct _store_info *si; struct _update_data *ud; gint hook = 0; @@ -1119,6 +1119,8 @@ mail_folder_cache_note_store (MailFolderCache *cache, g_return_if_fail (CAMEL_IS_STORE (store)); g_return_if_fail (mail_in_main_thread ()); + session = camel_service_get_session (CAMEL_SERVICE (store)); + g_mutex_lock (cache->priv->stores_mutex); si = g_hash_table_lookup (cache->priv->stores, store); diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h index a142272661..8253461c6b 100644 --- a/mail/mail-folder-cache.h +++ b/mail/mail-folder-cache.h @@ -109,7 +109,6 @@ GType mail_folder_cache_get_type (void) G_GNUC_CONST; MailFolderCache * mail_folder_cache_new (void); void mail_folder_cache_note_store (MailFolderCache *self, - CamelSession *session, CamelStore *store, GCancellable *cancellable, NoteDoneFunc done, diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 69089f97e8..44c5158631 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -1089,9 +1089,7 @@ receive_update_got_store (CamelStore *store, if (store) { mail_folder_cache_note_store ( - folder_cache, - CAMEL_SESSION (session), - store, info->cancellable, + folder_cache, store, info->cancellable, receive_update_got_folderinfo, info); } else { receive_done (info); -- cgit