[dovecot-cvs] dovecot/src/imap cmd-idle.c,1.23,1.24

cras at dovecot.org cras at dovecot.org
Fri Jan 6 20:22:38 EET 2006


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv27201

Modified Files:
	cmd-idle.c 
Log Message:
Recent changes broke IDLE when no mailbox was opened.



Index: cmd-idle.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-idle.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cmd-idle.c	30 Dec 2005 19:49:38 -0000	1.23
+++ cmd-idle.c	6 Jan 2006 18:22:36 -0000	1.24
@@ -184,7 +184,7 @@
 	} else if (ctx->sync_pending) {
 		/* more changes occurred while we were sending changes to
 		   client */
-                idle_sync_now(client->mailbox, ctx);
+		idle_sync_now(client->mailbox, ctx);
 	}
         client->output_pending = FALSE;
 
@@ -235,6 +235,7 @@
 
 	/* check immediately if there are changes. if they came before we
 	   added mailbox-notifier, we wouldn't see them otherwise. */
-	idle_sync_now(client->mailbox, ctx);
+	if (client->mailbox != NULL)
+		idle_sync_now(client->mailbox, ctx);
 	return FALSE;
 }



More information about the dovecot-cvs mailing list