dovecot-2.0: *-login: When showing mail_max_userip_connections e...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Mar 2 13:21:36 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/893abe2f65e0
changeset: 10826:893abe2f65e0
user: Timo Sirainen <tss at iki.fi>
date: Tue Mar 02 13:21:26 2010 +0200
description:
*-login: When showing mail_max_userip_connections error, show the limit also.
diffstat:
src/login-common/sasl-server.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r cc3f6adc1e0b -r 893abe2f65e0 src/login-common/sasl-server.c
--- a/src/login-common/sasl-server.c Tue Mar 02 11:40:52 2010 +0200
+++ b/src/login-common/sasl-server.c Tue Mar 02 13:21:26 2010 +0200
@@ -21,7 +21,7 @@
#define ERR_TOO_MANY_USERIP_CONNECTIONS \
"Maximum number of connections from user+IP exceeded " \
- "(mail_max_userip_connections)"
+ "(mail_max_userip_connections=%u)"
struct anvil_request {
struct client *client;
@@ -140,14 +140,18 @@
{
struct anvil_request *req = context;
struct client *client = req->client;
+ const struct login_settings *set = client->set;
+ const char *errmsg;
if (reply == NULL ||
- strtoul(reply, NULL, 10) < client->set->mail_max_userip_connections)
+ strtoul(reply, NULL, 10) < set->mail_max_userip_connections)
master_send_request(req);
else {
client->authenticating = FALSE;
+ errmsg = t_strdup_printf(ERR_TOO_MANY_USERIP_CONNECTIONS,
+ set->mail_max_userip_connections);
call_client_callback(client, SASL_SERVER_REPLY_MASTER_FAILED,
- ERR_TOO_MANY_USERIP_CONNECTIONS, NULL);
+ errmsg, NULL);
}
i_free(req);
}
More information about the dovecot-cvs
mailing list