From 06c47ebd97ac079c42c1cdb08f80b147bd82ae46 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 2 Nov 2009 03:54:39 +0000 Subject: [PATCH] * Made some annotations regarding bug 368 in the code. --- citadel/modules/imap/serv_imap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/citadel/modules/imap/serv_imap.c b/citadel/modules/imap/serv_imap.c index 3efe4a4e4..9cd1452f6 100644 --- a/citadel/modules/imap/serv_imap.c +++ b/citadel/modules/imap/serv_imap.c @@ -221,10 +221,8 @@ void imap_add_single_msgid(long msgnum, void *userdata) ++IMAP->num_msgs; if (IMAP->num_msgs > IMAP->num_alloc) { IMAP->num_alloc += REALLOC_INCREMENT; - IMAP->msgids = realloc(IMAP->msgids, - (IMAP->num_alloc * sizeof(long)) ); - IMAP->flags = realloc(IMAP->flags, - (IMAP->num_alloc * sizeof(long)) ); + IMAP->msgids = realloc(IMAP->msgids, (IMAP->num_alloc * sizeof(long)) ); + IMAP->flags = realloc(IMAP->flags, (IMAP->num_alloc * sizeof(long)) ); } IMAP->msgids[IMAP->num_msgs - 1] = msgnum; IMAP->flags[IMAP->num_msgs - 1] = 0; @@ -282,8 +280,7 @@ void imap_rescan_msgids(void) int num_recent = 0; if (IMAP->selected == 0) { - CtdlLogPrintf(CTDL_ERR, - "imap_load_msgids() can't run; no room selected\n"); + CtdlLogPrintf(CTDL_ERR, "imap_load_msgids() can't run; no room selected\n"); return; } @@ -367,6 +364,8 @@ void imap_rescan_msgids(void) /* * Now peruse the room for *new* messages only. + * This logic is probably the cause of Bug # 368 + * [ http://bugzilla.citadel.org/show_bug.cgi?id=368 ] */ if (num_msgs > 0) { for (j = 0; j < num_msgs; ++j) { -- 2.30.2