aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-21 18:32:07 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-21 18:32:07 +0800
commit10710cd23cca94d9b3df818aa48b8eb8f3af1c29 (patch)
treee8dc621e355e1d564c63ccebb4f249c19d9279cf
parentaf4ddea0ace62bdfafac997faec7e4fbfa3dc3a1 (diff)
downloadgsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.tar
gsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.tar.gz
gsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.tar.bz2
gsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.tar.lz
gsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.tar.xz
gsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.tar.zst
gsoc2013-evolution-10710cd23cca94d9b3df818aa48b8eb8f3af1c29.zip
Bug #648468 - Disconnect service after mail fetching is done
-rw-r--r--mail/mail-ops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 79fce90458..338e83ff53 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -322,11 +322,18 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
em_filter_folder_element_exec (fm, cancellable, error);
}
+ g_object_ref (parent_store);
+
/* we unref the source folder here since we
may now block in finalize (we try to
disconnect cleanly) */
g_object_unref (fm->source_folder);
fm->source_folder = NULL;
+
+ /* also disconnect if not a local delivery mbox;
+ there is no need to keep the connection alive forever */
+ camel_service_disconnect_sync (CAMEL_SERVICE (parent_store), TRUE, NULL);
+ g_object_unref (parent_store);
}
}
fail: