From 67936b0c77a2e534b381e80ff73675447d87ce48 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 17 Jun 2000 19:12:47 +0000 Subject: Add some debugging printfs when rebulding summary to help figure out why * providers/mbox/camel-mbox-summary.c: Add some debugging printfs when rebulding summary to help figure out why people's summaries are always being rebuilt. svn path=/trunk/; revision=3614 --- camel/ChangeLog | 6 ++++++ camel/providers/mbox/camel-mbox-summary.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 9416b9326e..a2de60c2fb 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2000-06-17 Dan Winship + + * providers/mbox/camel-mbox-summary.c: Add some debugging printfs + when rebulding summary to help figure out why people's summaries + are always being rebuilt. + 2000-06-17 Jeffrey Stedfast * providers/imap/camel-imap-folder.c (imap_search_by_expression): diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c index 17af8b312b..40ad7f3a2b 100644 --- a/camel/providers/mbox/camel-mbox-summary.c +++ b/camel/providers/mbox/camel-mbox-summary.c @@ -372,6 +372,8 @@ camel_mbox_summary_load(CamelMboxSummary *mbs, int forceindex) } if (forceindex || camel_folder_summary_load(s) == -1) { + printf ("REBUILDING SUMMARY: %s\n", + forceindex ? "Summary non-existent." : "Summary load failed."); camel_folder_summary_clear(s); ret = summary_rebuild(mbs, 0); } else { @@ -395,12 +397,13 @@ camel_mbox_summary_load(CamelMboxSummary *mbs, int forceindex) printf("Summary time and date match mbox\n"); if (minstart < st.st_size) { /* FIXME: Only clear the messages and reindex from this point forward */ + printf ("REBUILDING SUMMARY: Index file is incomplete.\n"); camel_folder_summary_clear(s); ret = summary_rebuild(mbs, 0); } } else { if (mbs->folder_size < st.st_size) { - printf("Index is for a smaller mbox\n"); + printf("REBUILDING SUMMARY: Summary is for a smaller mbox\n"); if (minstart < mbs->folder_size) { /* FIXME: only make it rebuild as necessary */ camel_folder_summary_clear(s); @@ -409,7 +412,10 @@ camel_mbox_summary_load(CamelMboxSummary *mbs, int forceindex) ret = summary_rebuild(mbs, mbs->folder_size); } } else { - printf("index is for a bigger mbox\n"); + if (mbs->folder_size > st.st_size) + printf("REBUILDING_SUMMARY: Summary is for a bigger mbox\n"); + else + printf("REBUILDING SUMMARY: Summary is for an older mbox\n"); camel_folder_summary_clear(s); ret = summary_rebuild(mbs, 0); } -- cgit v1.2.3