# HG changeset patch # User Timo Sirainen # Date 1219673667 -10800 # Node ID 16cb3a2b25abf68584a49ec5a1b874a1fdbdcdef # Parent ad9ad222729cd06f0ab0e48ca695b6e3db8251c6 If client disconnects without any auth attempts, don't log "auth failed". diff -r ad9ad222729c -r 16cb3a2b25ab src/imap-login/client.c --- a/src/imap-login/client.c Mon Aug 25 16:47:22 2008 +0300 +++ b/src/imap-login/client.c Mon Aug 25 17:14:27 2008 +0300 @@ -547,8 +547,10 @@ client->destroyed = TRUE; if (!client->login_success && reason != NULL) { - reason = t_strdup_printf("%s (auth failed, %u attempts)", - reason, client->common.auth_attempts); + reason = client->common.auth_attempts == 0 ? + t_strdup_printf("%s (no auth attempts)", reason) : + t_strdup_printf("%s (auth failed, %u attempts)", + reason, client->common.auth_attempts); } if (reason != NULL) client_syslog(&client->common, reason); diff -r ad9ad222729c -r 16cb3a2b25ab src/pop3-login/client.c --- a/src/pop3-login/client.c Mon Aug 25 16:47:22 2008 +0300 +++ b/src/pop3-login/client.c Mon Aug 25 17:14:27 2008 +0300 @@ -352,8 +352,10 @@ client->destroyed = TRUE; if (!client->login_success && reason != NULL) { - reason = t_strdup_printf("%s (auth failed, %u attempts)", - reason, client->common.auth_attempts); + reason = client->common.auth_attempts == 0 ? + t_strdup_printf("%s (no auth attempts)", reason) : + t_strdup_printf("%s (auth failed, %u attempts)", + reason, client->common.auth_attempts); } if (reason != NULL) client_syslog(&client->common, reason);