Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9230:2bb46e1c0f53 HEAD
IMAP: When QRESYNC is enabled, don't crash when a new mail is received while IDLEing.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 15 Jul 2009 16:09:09 -0400 |
parents | 6a54f2c41cec |
children | 71242a8c2dff |
files | src/imap/imap-sync.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ } 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 @@ 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,