dovecot-2.1: login proxy: If server disconnects during auth, log...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jan 10 00:34:15 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/dd48e9094efb
changeset: 13918:dd48e9094efb
user: Timo Sirainen <tss at iki.fi>
date: Tue Jan 10 00:34:09 2012 +0200
description:
login proxy: If server disconnects during auth, log the connection duration.
diffstat:
src/login-common/client-common-auth.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 16d32dda723c -r dd48e9094efb src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c Mon Jan 09 23:57:25 2012 +0200
+++ b/src/login-common/client-common-auth.c Tue Jan 10 00:34:09 2012 +0200
@@ -199,6 +199,7 @@
{
struct istream *input;
const char *line;
+ unsigned int duration;
if (client->login_proxy == NULL) {
/* we're just freeing the proxy */
@@ -225,11 +226,14 @@
client_proxy_failed(client, TRUE);
return;
case -1:
+ duration = ioloop_time - client->created;
client_log_err(client, t_strdup_printf(
- "proxy: Remote %s:%u disconnected: %s (state=%u)",
+ "proxy: Remote %s:%u disconnected: %s "
+ "(state=%u, duration=%us)",
login_proxy_get_host(client->login_proxy),
login_proxy_get_port(client->login_proxy),
- get_disconnect_reason(input), client->proxy_state));
+ get_disconnect_reason(input),
+ client->proxy_state, duration));
client_proxy_failed(client, TRUE);
return;
}
More information about the dovecot-cvs
mailing list