dovecot-2.0-sslstream: IDLE: After seeing a change, don't check ...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:56:10 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/cd1ce06a0ee5
changeset: 10281:cd1ce06a0ee5
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 09 15:12:01 2009 -0500
description:
IDLE: After seeing a change, don't check for more changes every 0,5 seconds.

diffstat:

1 file changed, 9 insertions(+), 10 deletions(-)
src/lib-storage/index/index-mailbox-check.c |   19 +++++++++----------

diffs (36 lines):

diff -r b93d2e668eba -r cd1ce06a0ee5 src/lib-storage/index/index-mailbox-check.c
--- a/src/lib-storage/index/index-mailbox-check.c	Mon Nov 09 15:04:33 2009 -0500
+++ b/src/lib-storage/index/index-mailbox-check.c	Mon Nov 09 15:12:01 2009 -0500
@@ -23,6 +23,13 @@ struct index_notify_io {
 	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 @@ static void check_timeout(struct index_m
 		}
 	}
 
-	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)


More information about the dovecot-cvs mailing list