Mercurial > dovecot > core-2.2
changeset 1732:9f89edcfc043 HEAD
IDLE fixes..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 24 Aug 2003 15:58:13 +0300 |
parents | 687a06278ef5 |
children | 6c4a75f4e40c |
files | src/imap/cmd-idle.c src/lib-storage/index/index-mailbox-check.c src/lib-storage/index/index-storage.h |
diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-idle.c Sun Aug 24 15:49:43 2003 +0300 +++ b/src/imap/cmd-idle.c Sun Aug 24 15:58:13 2003 +0300 @@ -10,7 +10,6 @@ #define DEFAULT_IDLE_CHECK_INTERVAL 30 -#include "imap-fetch.h" static void idle_finish(struct client *client, int done_ok) { if (client->idle_to != NULL) {
--- a/src/lib-storage/index/index-mailbox-check.c Sun Aug 24 15:49:43 2003 +0300 +++ b/src/lib-storage/index/index-mailbox-check.c Sun Aug 24 15:58:13 2003 +0300 @@ -30,7 +30,8 @@ if (sync) { ibox->box.sync(&ibox->box, ibox->autosync_flags); - ibox->autosync_pending = FALSE; + ibox->sync_last_notify = ioloop_time; + ibox->autosync_pending = FALSE; } } @@ -38,10 +39,11 @@ { struct index_mailbox *ibox = context; - if ((unsigned int) (ioloop_time - ibox->sync_last_check) >= + ibox->sync_last_check = ioloop_time; + if ((unsigned int) (ioloop_time - ibox->sync_last_notify) >= ibox->min_newmail_notify_interval) { - ibox->sync_last_check = ioloop_time; ibox->box.sync(&ibox->box, ibox->autosync_flags); + ibox->sync_last_notify = ioloop_time; ibox->autosync_pending = FALSE; } else { ibox->autosync_pending = TRUE;
--- a/src/lib-storage/index/index-storage.h Sun Aug 24 15:49:43 2003 +0300 +++ b/src/lib-storage/index/index-storage.h Sun Aug 24 15:58:13 2003 +0300 @@ -33,7 +33,7 @@ struct index_autosync_file *autosync_files; struct index_autosync_io *autosync_ios; enum mailbox_sync_flags autosync_flags; - time_t sync_last_check; + time_t sync_last_check, sync_last_notify; unsigned int min_newmail_notify_interval; struct index_mail fetch_mail; /* fetch_uid() or fetch_seq() */