dovecot-2.0: lib-auth: Less leaky fix to previous auth_master_*(...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 5 14:24:03 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/57477db05aff
changeset: 12393:57477db05aff
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 05 12:24:01 2010 +0000
description:
lib-auth: Less leaky fix to previous auth_master_*() bugfix.
diffstat:
src/lib-auth/auth-master.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (41 lines):
diff -r 55d144a33e62 -r 57477db05aff src/lib-auth/auth-master.c
--- a/src/lib-auth/auth-master.c Fri Nov 05 12:15:53 2010 +0000
+++ b/src/lib-auth/auth-master.c Fri Nov 05 12:24:01 2010 +0000
@@ -309,8 +309,10 @@
static void auth_master_unset_io(struct auth_master_connection *conn,
struct ioloop *prev_ioloop)
{
- io_loop_set_current(prev_ioloop);
- lib_signals_reset_ioloop();
+ if (prev_ioloop != NULL) {
+ io_loop_set_current(prev_ioloop);
+ lib_signals_reset_ioloop();
+ }
io_loop_set_current(conn->ioloop);
timeout_remove(&conn->to);
@@ -320,8 +322,12 @@
io_loop_destroy(&conn->ioloop);
if ((conn->flags & AUTH_MASTER_FLAG_NO_IDLE_TIMEOUT) == 0) {
- conn->to = timeout_add(1000*AUTH_MASTER_IDLE_SECS,
- auth_idle_timeout, conn);
+ if (prev_ioloop == NULL)
+ auth_connection_close(conn);
+ else {
+ conn->to = timeout_add(1000*AUTH_MASTER_IDLE_SECS,
+ auth_idle_timeout, conn);
+ }
}
}
@@ -370,8 +376,7 @@
io_loop_run(conn->ioloop);
}
- if (prev_ioloop != NULL)
- auth_master_unset_io(conn, prev_ioloop);
+ auth_master_unset_io(conn, prev_ioloop);
if (conn->aborted) {
conn->aborted = FALSE;
auth_connection_close(conn);
More information about the dovecot-cvs
mailing list