X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fserv_imap.c;h=9cd1452f690abe65dab011021eef0c20bb6152de;hb=06c47ebd97ac079c42c1cdb08f80b147bd82ae46;hp=3efe4a4e494f088e0147e3dbe997dcb1a79af6d0;hpb=5226db6132135072d078622f57234b3dd1a5d35a;p=citadel.git 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) {