dovecot-2.1: imapc: Fixed IDLE handling.

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 4 11:30:18 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/e1a8ad9c83cd
changeset: 13376:e1a8ad9c83cd
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 04 10:48:46 2011 +0300
description:
imapc: Fixed IDLE handling.

diffstat:

 src/lib-storage/index/imapc/imapc-storage.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 583023c4db60 -r e1a8ad9c83cd src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c	Sun Sep 04 10:40:58 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Sun Sep 04 10:48:46 2011 +0300
@@ -510,6 +510,16 @@
 				 imapc_async_callback, mbox->storage);
 }
 
+static void imapc_idle_noop_callback(const struct imapc_command_reply *reply,
+				     void *context)
+
+{
+	struct imapc_mailbox *mbox = context;
+
+	imapc_async_callback(reply, mbox->box.storage);
+	imapc_client_mailbox_idle(mbox->client_box);
+}
+
 static void imapc_notify_changes(struct mailbox *box)
 {
 	struct imapc_mailbox *mbox = (struct imapc_mailbox *)box;
@@ -528,7 +538,7 @@
 		   here by sending a NOOP. this helps with clients that break
 		   IDLE when clicking "get mail". */
 		imapc_client_mailbox_cmd(mbox->client_box, "NOOP",
-					 imapc_async_callback, mbox->storage);
+					 imapc_idle_noop_callback, mbox);
 	} else {
 		/* remote server doesn't support IDLE.
 		   check for changes with NOOP every once in a while. */


More information about the dovecot-cvs mailing list