Hack and debug log to get one hard to get imap crash.
authorSrinivasa Ragavan <sragavan@novell.com>
Mon, 12 Jan 2009 03:38:36 +0000 (03:38 +0000)
committerSrinivasa Ragavan <sragavan@src.gnome.org>
Mon, 12 Jan 2009 03:38:36 +0000 (03:38 +0000)
2009-01-12  Srinivasa Ragavan  <sragavan@novell.com>

* camel-imap-folder.c: (imap_rescan), (imap_update_summary): Hack and
debug log to get one hard to get imap crash.

svn path=/trunk/; revision=9907

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

index 418dd87..55ee977 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-12  Srinivasa Ragavan  <sragavan@novell.com>
+
+       * camel-imap-folder.c: (imap_rescan), (imap_update_summary): Hack and
+       debug log to get one hard to get imap crash.
+
 2009-01-08  Milan Crha  <mcrha@redhat.com>
 
        ** Part of fix for bug #554182
index 3e94b15..92ca282 100644 (file)
@@ -963,6 +963,13 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
                        continue;
 
                info = camel_folder_summary_uid (folder->summary, uid);
+               if (!info) {
+                       if (g_getenv("CRASH_IMAP")) { /* Debug logs to tackle on hard to get imap crasher */
+                               printf("CRASH: %s: %s", folder->full_name, uid);
+                               g_assert(0);
+                       } else
+                               continue;
+               }
 
                iinfo = (CamelImapMessageInfo *)info;
 
@@ -3512,6 +3519,8 @@ imap_update_summary (CamelFolder *folder, int exists,
                   messages will be filtered even after saw by other software earlier */
                if ((mi->info.flags & CAMEL_IMAP_MESSAGE_RECENT) != 0 || getenv ("FILTER_RECENT") == NULL)
                        camel_folder_change_info_recent_uid (changes, camel_message_info_uid (mi));
+               printf("NEW: %s: %s(%d)\n", ((CamelMessageInfoBase *)mi)->from, ((CamelMessageInfoBase *)mi)->subject, ((CamelMessageInfoBase *)mi)->refcount);
+
        }
 
        g_ptr_array_free (messages, TRUE);