dovecot-2.0: auth: Log a message when auth request is removed du...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 3 16:11:33 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/2a132661c029
changeset: 11249:2a132661c029
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 03 16:10:48 2010 +0300
description:
auth: Log a message when auth request is removed due to timeout.

diffstat:

 src/auth/auth-request-handler.c |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 1fd45deee948 -r 2a132661c029 src/auth/auth-request-handler.c
--- a/src/auth/auth-request-handler.c	Mon May 03 16:01:09 2010 +0300
+++ b/src/auth/auth-request-handler.c	Mon May 03 16:10:48 2010 +0300
@@ -276,6 +276,20 @@
 
 static void auth_request_timeout(struct auth_request *request)
 {
+	const char *str;
+
+	str = t_strdup_printf("Request %u.%u timeouted after %u secs, state=%d",
+			      request->handler->client_pid, request->id,
+			      (unsigned int)(time(NULL) - request->last_access),
+			      request->state);
+	if (request->state != AUTH_REQUEST_STATE_MECH_CONTINUE) {
+		/* client's fault */
+		auth_request_log_error(request, request->mech->mech_name,
+				       "%s", str);
+	} else if (request->set->verbose) {
+		auth_request_log_info(request, request->mech->mech_name,
+				      "%s", str);
+	}
 	auth_request_handler_remove(request->handler, request);
 }
 


More information about the dovecot-cvs mailing list