2007-01-09 17:58:05 +01:00
|
|
|
Index: camel/camel.c
|
|
|
|
===================================================================
|
2007-03-23 01:49:46 +01:00
|
|
|
--- camel/camel.c.orig
|
|
|
|
+++ camel/camel.c
|
2007-01-09 17:58:05 +01:00
|
|
|
@@ -44,6 +44,8 @@
|
|
|
|
|
|
|
|
static int initialised = FALSE;
|
|
|
|
|
|
|
|
+int camel_application_is_exiting = FALSE;
|
|
|
|
+
|
|
|
|
static void
|
|
|
|
camel_shutdown (void)
|
|
|
|
{
|
|
|
|
Index: camel/providers/imap/camel-imap-folder.c
|
|
|
|
===================================================================
|
2007-03-23 01:49:46 +01:00
|
|
|
--- camel/providers/imap/camel-imap-folder.c.orig
|
|
|
|
+++ camel/providers/imap/camel-imap-folder.c
|
|
|
|
@@ -605,6 +605,7 @@ imap_rescan (CamelFolder *folder, int ex
|
2007-01-09 17:58:05 +01:00
|
|
|
{
|
|
|
|
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
|
|
|
|
CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
|
|
|
|
+ extern int camel_application_is_exiting;
|
|
|
|
struct {
|
|
|
|
char *uid;
|
|
|
|
guint32 flags;
|
2007-03-23 01:49:46 +01:00
|
|
|
@@ -618,6 +619,9 @@ imap_rescan (CamelFolder *folder, int ex
|
2007-01-09 17:58:05 +01:00
|
|
|
gboolean ok;
|
|
|
|
CamelFolderChangeInfo *changes = NULL;
|
2007-03-23 01:49:46 +01:00
|
|
|
|
2007-01-09 17:58:05 +01:00
|
|
|
+ if (camel_application_is_exiting)
|
|
|
|
+ return;
|
2007-03-23 01:49:46 +01:00
|
|
|
+
|
2007-01-09 17:58:05 +01:00
|
|
|
imap_folder->need_rescan = FALSE;
|
|
|
|
|
2007-03-23 01:49:46 +01:00
|
|
|
summary_len = camel_folder_summary_count (folder->summary);
|
|
|
|
@@ -2634,6 +2638,7 @@ camel_imap_folder_changed (CamelFolder *
|
2007-01-09 17:58:05 +01:00
|
|
|
GArray *expunged, CamelException *ex)
|
|
|
|
{
|
|
|
|
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
|
|
|
|
+ extern int camel_application_is_exiting;
|
|
|
|
CamelFolderChangeInfo *changes;
|
|
|
|
CamelMessageInfo *info;
|
|
|
|
int len;
|
2007-03-23 01:49:46 +01:00
|
|
|
@@ -2661,7 +2666,7 @@ camel_imap_folder_changed (CamelFolder *
|
2007-01-09 17:58:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
len = camel_folder_summary_count (folder->summary);
|
|
|
|
- if (exists > len)
|
|
|
|
+ if (exists > len && !camel_application_is_exiting)
|
|
|
|
imap_update_summary (folder, exists, changes, ex);
|
|
|
|
|
|
|
|
if (camel_folder_change_info_changed (changes))
|
|
|
|
Index: camel/providers/groupwise/camel-groupwise-folder.c
|
|
|
|
===================================================================
|
2007-03-23 01:49:46 +01:00
|
|
|
--- camel/providers/groupwise/camel-groupwise-folder.c.orig
|
|
|
|
+++ camel/providers/groupwise/camel-groupwise-folder.c
|
|
|
|
@@ -60,7 +60,7 @@
|
2007-01-09 17:58:05 +01:00
|
|
|
#define ADD_JUNK_ENTRY 1
|
|
|
|
#define REMOVE_JUNK_ENTRY -1
|
|
|
|
#define JUNK_FOLDER "Junk Mail"
|
|
|
|
-#define READ_CURSOR_MAX_IDS 500
|
|
|
|
+#define READ_CURSOR_MAX_IDS 50
|
|
|
|
#define MAX_ATTACHMENT_SIZE 1*1024*1024 /*In bytes*/
|
2007-03-23 01:49:46 +01:00
|
|
|
#define GROUPWISE_BULK_DELETE_LIMIT 100
|
2007-01-09 17:58:05 +01:00
|
|
|
|
2007-03-23 01:49:46 +01:00
|
|
|
@@ -856,6 +856,9 @@ struct _folder_update_msg {
|
2007-01-09 17:58:05 +01:00
|
|
|
static void
|
|
|
|
update_update (CamelSession *session, CamelSessionThreadMsg *msg)
|
|
|
|
{
|
|
|
|
+
|
|
|
|
+ extern int camel_application_is_exiting;
|
|
|
|
+
|
|
|
|
struct _folder_update_msg *m = (struct _folder_update_msg *)msg;
|
|
|
|
EGwConnectionStatus status;
|
|
|
|
CamelException *ex = NULL;
|
2007-03-23 01:49:46 +01:00
|
|
|
@@ -874,7 +877,7 @@ update_update (CamelSession *session, Ca
|
2007-01-09 17:58:05 +01:00
|
|
|
done = FALSE;
|
|
|
|
m->slist = NULL;
|
|
|
|
|
|
|
|
- while (!done) {
|
|
|
|
+ while (!done && !camel_application_is_exiting) {
|
|
|
|
item_list = NULL;
|
|
|
|
status = e_gw_connection_get_all_mail_uids (m->cnc, m->container_id, cursor, FALSE, READ_CURSOR_MAX_IDS, position, &item_list);
|
|
|
|
if (status != E_GW_CONNECTION_STATUS_OK) {
|