[evolution] mail_folder_cache_note_store: CamelSession arg is unnecessary.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] mail_folder_cache_note_store: CamelSession arg is unnecessary.
- Date: Thu, 8 Dec 2011 05:35:00 +0000 (UTC)
commit 60978976388e00a611f2aeb87c9b27e67a2b0f05
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Dec 7 22:27:16 2011 -0500
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(-)
---
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index 2d180fe..283a860 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 88b089e..0baaa0e 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 a142272..8253461 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 69089f9..44c5158 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]