dovecot-2.1: lib-auth: Log a warning about auth disconnection on...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Nov 23 20:31:56 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/49044b7cfa3d
changeset: 13757:49044b7cfa3d
user: Timo Sirainen <tss at iki.fi>
date: Wed Nov 23 20:31:40 2011 +0200
description:
lib-auth: Log a warning about auth disconnection only if there are pending requests.
diffstat:
src/lib-auth/auth-server-connection.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r 540d9d296dc9 -r 49044b7cfa3d src/lib-auth/auth-server-connection.c
--- a/src/lib-auth/auth-server-connection.c Wed Nov 23 19:51:06 2011 +0200
+++ b/src/lib-auth/auth-server-connection.c Wed Nov 23 20:31:40 2011 +0200
@@ -243,7 +243,6 @@
return;
case -1:
/* disconnected */
- i_error("Authentication server disconnected, reconnecting");
auth_server_connection_reconnect(conn);
return;
case -2:
@@ -309,7 +308,13 @@
static const char *const temp_failure_args[] = { "temp", NULL };
struct hash_iterate_context *iter;
void *key, *value;
+ unsigned int request_count = hash_table_count(conn->requests);
+ if (request_count == 0)
+ return;
+
+ i_warning("Auth connection closed with %u pending requests",
+ request_count);
iter = hash_table_iterate_init(conn->requests);
while (hash_table_iterate(iter, &key, &value)) {
struct auth_client_request *request = value;
@@ -378,6 +383,7 @@
*_conn = NULL;
auth_server_connection_disconnect(conn);
+ i_assert(hash_table_count(conn->requests) == 0);
hash_table_destroy(&conn->requests);
array_free(&conn->available_auth_mechs);
pool_unref(&conn->pool);
More information about the dovecot-cvs
mailing list