** Fix for bnc #167638
authorSrinivasa Ragavan <sragavan@novell.com>
Mon, 18 Feb 2008 04:27:24 +0000 (04:27 +0000)
committerSrinivasa Ragavan <sragavan@src.gnome.org>
Mon, 18 Feb 2008 04:27:24 +0000 (04:27 +0000)
2008-02-18  Srinivasa Ragavan  <sragavan@novell.com>

** Fix for bnc #167638

* camel.c: Upstreamed OpenSUSE patch. Patch by Fejj to quit evolution
faster. (Dont try downloading while exitting).

svn path=/trunk/; revision=8495

camel/ChangeLog
camel/camel.c
camel/providers/groupwise/ChangeLog
camel/providers/groupwise/camel-groupwise-folder.c
camel/providers/imap/ChangeLog
camel/providers/imap/camel-imap-folder.c

index b17a0e0..79f047f 100644 (file)
@@ -1,3 +1,10 @@
+2008-02-18  Srinivasa Ragavan  <sragavan@novell.com>
+
+       ** Fix for bnc #167638
+
+       * camel.c: Upstreamed OpenSUSE patch. Patch by Fejj to quit evolution
+       faster. (Dont try downloading while exitting).
+
 2008-02-14  Matthew Barnes  <mbarnes@redhat.com>
 
        ** Fixes part of bug #516074
index 15b17d2..51911b3 100644 (file)
@@ -46,6 +46,8 @@
 
 static int initialised = FALSE;
 
+int camel_application_is_exiting = FALSE;
+
 static void
 camel_shutdown (void)
 {
index 79eebd1..902cee0 100644 (file)
@@ -1,3 +1,10 @@
+2008-02-18  Srinivasa Ragavan  <sragavan@novell.com>
+
+       ** Fix for bnc #167638
+
+       * camel-groupwise-folder.c: (update_update): Upstreamed OpenSUSE patch
+       by Sankar. Quit GW download after Quit requested.
+
 2008-01-30  Milan Crha  <mcrha@redhat.com>
 
        ** Part of fix for bug #395939
index 55dbb4e..95067eb 100644 (file)
@@ -64,7 +64,7 @@
 #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*/
 #define GROUPWISE_BULK_DELETE_LIMIT 100
 
@@ -865,6 +865,9 @@ struct _folder_update_msg {
 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;
@@ -883,7 +886,7 @@ update_update (CamelSession *session, CamelSessionThreadMsg *msg)
        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) {
index f42b625..9ceef65 100644 (file)
@@ -1,3 +1,11 @@
+2008-02-18  Srinivasa Ragavan  <sragavan@novell.com>
+
+       ** Fix for bnc #167638
+
+       * camel-imap-folder.c: (imap_rescan), (camel_imap_folder_changed): Upstreamed 
+       OpenSUSE patch. Patch by Fejj to quit evolution faster. 
+       (Dont try downloading while exitting).
+
 2008-02-11  Milan Crha  <mcrha@redhat.com>
 
        ** Fix for bug #515054
index e6ee185..79fde37 100644 (file)
@@ -652,6 +652,7 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
 {
        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;
@@ -665,6 +666,9 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
        gboolean ok;
        CamelFolderChangeInfo *changes = NULL;
 
+       if (camel_application_is_exiting)
+               return;
+       
        imap_folder->need_rescan = FALSE;
 
        summary_len = camel_folder_summary_count (folder->summary);
@@ -2789,6 +2793,7 @@ camel_imap_folder_changed (CamelFolder *folder, int exists,
                           GArray *expunged, CamelException *ex)
 {
        CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
+       extern int camel_application_is_exiting;
        CamelFolderChangeInfo *changes;
        CamelMessageInfo *info;
        int len;
@@ -2816,7 +2821,7 @@ camel_imap_folder_changed (CamelFolder *folder, int exists,
        }
 
        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))