dovecot-2.0: imap: Fixed previous idle change more correctly.
dovecot at dovecot.org
dovecot at dovecot.org
Mon May 31 21:28:07 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/ba9d1b490bc3
changeset: 11437:ba9d1b490bc3
user: Timo Sirainen <tss at iki.fi>
date: Mon May 31 19:28:04 2010 +0100
description:
imap: Fixed previous idle change more correctly.
The previous way could have crashed in some situations.
diffstat:
src/imap/cmd-idle.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 38ce28c0bca3 -r ba9d1b490bc3 src/imap/cmd-idle.c
--- a/src/imap/cmd-idle.c Mon May 31 19:15:01 2010 +0100
+++ b/src/imap/cmd-idle.c Mon May 31 19:28:04 2010 +0100
@@ -127,11 +127,15 @@
static void idle_callback(struct mailbox *box, struct cmd_idle_context *ctx)
{
+ struct client *client = ctx->client;
+
if (ctx->sync_ctx != NULL)
ctx->sync_pending = TRUE;
else {
ctx->manual_cork = TRUE;
idle_sync_now(box, ctx);
+ if (client->disconnected)
+ client_destroy(client, NULL);
}
}
@@ -207,7 +211,6 @@
if (client->output->closed) {
idle_finish(ctx, FALSE, FALSE);
- client_destroy(client, NULL);
return TRUE;
}
if (client->io == NULL) {
More information about the dovecot-cvs
mailing list