dovecot-1.2: IMAP: When QRESYNC is enabled, don't crash when a n...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 15 23:09:17 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/2bb46e1c0f53
changeset: 9230:2bb46e1c0f53
user: Timo Sirainen <tss at iki.fi>
date: Wed Jul 15 16:09:09 2009 -0400
description:
IMAP: When QRESYNC is enabled, don't crash when a new mail is received while IDLEing.
diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
src/imap/imap-sync.c | 5 +++--
diffs (22 lines):
diff -r 6a54f2c41cec -r 2bb46e1c0f53 src/imap/imap-sync.c
--- a/src/imap/imap-sync.c Wed Jul 15 12:59:17 2009 -0400
+++ b/src/imap/imap-sync.c Wed Jul 15 16:09:09 2009 -0400
@@ -180,7 +180,7 @@ imap_sync_send_highestmodseq(struct imap
} else if (!status->sync_delayed_expunges &&
status->highest_modseq > client->sync_last_full_modseq &&
status->highest_modseq > client->highest_fetch_modseq) {
- /* we've probably send some VANISHED or EXISTS replies which
+ /* we've probably sent some VANISHED or EXISTS replies which
increased the highest-modseq. notify the client about
this. */
send_modseq = status->highest_modseq;
@@ -188,7 +188,8 @@ imap_sync_send_highestmodseq(struct imap
if (send_modseq == 0) {
/* no sending */
- } else if (strncmp(sync_cmd->sync->tagline, "OK ", 3) == 0 &&
+ } else if (sync_cmd->sync != NULL && /* IDLE doesn't have ->sync */
+ strncmp(sync_cmd->sync->tagline, "OK ", 3) == 0 &&
sync_cmd->sync->tagline[3] != '[') {
/* modify the tagged reply directly */
sync_cmd->sync->tagline = p_strdup_printf(sync_cmd->pool,
More information about the dovecot-cvs
mailing list