dovecot-2.2: auth: If userdb iteration client disconnects early,...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 10 21:00:37 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/99dc3e3a3f75
changeset: 17937:99dc3e3a3f75
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 10 23:59:52 2014 +0300
description:
auth: If userdb iteration client disconnects early, make sure we don't get stuck.
diffstat:
src/auth/userdb-blocking.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 4a401e9853ee -r 99dc3e3a3f75 src/auth/userdb-blocking.c
--- a/src/auth/userdb-blocking.c Fri Oct 10 18:11:58 2014 +0300
+++ b/src/auth/userdb-blocking.c Fri Oct 10 23:59:52 2014 +0300
@@ -66,9 +66,11 @@
struct blocking_userdb_iterate_context *ctx = context;
if (strncmp(reply, "*\t", 2) == 0) {
+ if (ctx->destroyed)
+ return TRUE;
ctx->next = FALSE;
ctx->ctx.callback(reply + 2, ctx->ctx.context);
- return ctx->next;
+ return ctx->next || ctx->destroyed;
}
if (strcmp(reply, "OK") != 0)
@@ -120,5 +122,7 @@
/* iter_callback() may still be called */
ctx->destroyed = TRUE;
+
+ auth_worker_server_resume_input(ctx->conn);
return ret;
}
More information about the dovecot-cvs
mailing list