Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9550:affad804356e HEAD
IDLE: After a change, mailbox changes were being re-checked every 0.5 seconds.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 08 Mar 2010 19:16:54 +0200 |
parents | 6794893d03c9 |
children | 4bc6b41be8ff |
files | src/lib-storage/index/index-mailbox-check.c |
diffstat | 1 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-mailbox-check.c Mon Mar 08 19:07:06 2010 +0200 +++ b/src/lib-storage/index/index-mailbox-check.c Mon Mar 08 19:16:54 2010 +0200 @@ -23,6 +23,13 @@ struct io *io; }; +static void notify_delay_callback(struct index_mailbox *ibox) +{ + if (ibox->notify_delay_to != NULL) + timeout_remove(&ibox->notify_delay_to); + ibox->box.notify_callback(&ibox->box, ibox->box.notify_context); +} + static void check_timeout(struct index_mailbox *ibox) { struct index_notify_file *file; @@ -37,16 +44,8 @@ } } - if (notify) { - if (ibox->notify_delay_to != NULL) - timeout_remove(&ibox->notify_delay_to); - ibox->box.notify_callback(&ibox->box, ibox->box.notify_context); - } -} - -static void notify_delay_callback(struct index_mailbox *ibox) -{ - ibox->box.notify_callback(&ibox->box, ibox->box.notify_context); + if (notify) + notify_delay_callback(ibox); } static void notify_callback(struct index_mailbox *ibox)