From: Timo Sirainen Date: Thu, 9 Apr 2020 21:37:34 +0000 (+0300) Subject: login-common: Replace i_error() with e_error() where possible X-Git-Tag: 2.3.11.2~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95c63f3e9efdb7ba916dac3e6b013d131392c48a;p=thirdparty%2Fdovecot%2Fcore.git login-common: Replace i_error() with e_error() where possible --- diff --git a/src/login-common/client-common-auth.c b/src/login-common/client-common-auth.c index 70e717d037..15f1dcccfc 100644 --- a/src/login-common/client-common-auth.c +++ b/src/login-common/client-common-auth.c @@ -165,7 +165,8 @@ static void client_auth_parse_args(struct client *client, bool success, reply_r->source_ip = value; else if (strcmp(key, "port") == 0) { if (net_str2port(value, &reply_r->port) < 0) { - i_error("Auth service returned invalid " + e_error(client->event, + "Auth service returned invalid " "port number: %s", value); } } else if (strcmp(key, "destuser") == 0) @@ -174,13 +175,15 @@ static void client_auth_parse_args(struct client *client, bool success, reply_r->password = value; else if (strcmp(key, "proxy_timeout") == 0) { if (str_to_uint(value, &reply_r->proxy_timeout_msecs) < 0) { - i_error("BUG: Auth service returned invalid " + e_error(client->event, + "BUG: Auth service returned invalid " "proxy_timeout value: %s", value); } reply_r->proxy_timeout_msecs *= 1000; } else if (strcmp(key, "proxy_refresh") == 0) { if (str_to_uint(value, &reply_r->proxy_refresh_secs) < 0) { - i_error("BUG: Auth service returned invalid " + e_error(client->event, + "BUG: Auth service returned invalid " "proxy_refresh value: %s", value); } } else if (strcmp(key, "proxy_mech") == 0) @@ -734,7 +737,7 @@ sasl_callback(struct client *client, enum sasl_server_reply sasl_reply, /* the fd may still be hanging somewhere in kernel or another process. make sure the client gets disconnected. */ if (shutdown(client->fd, SHUT_RDWR) < 0 && errno != ENOTCONN) - i_error("shutdown() failed: %m"); + e_error(client->event, "shutdown() failed: %m"); if (data != NULL) { /* e.g. mail_max_userip_connections is reached */ diff --git a/src/login-common/client-common.c b/src/login-common/client-common.c index b201a0b957..8b9ccb0170 100644 --- a/src/login-common/client-common.c +++ b/src/login-common/client-common.c @@ -154,7 +154,7 @@ static bool client_is_trusted(struct client *client) net = t_strsplit_spaces(client->set->login_trusted_networks, ", "); for (; *net != NULL; net++) { if (net_parse_range(*net, &net_ip, &bits) < 0) { - i_error("login_trusted_networks: " + e_error(client->event, "login_trusted_networks: " "Invalid network '%s'", *net); break; } diff --git a/src/login-common/login-proxy.c b/src/login-common/login-proxy.c index 900e24bb94..57d778a404 100644 --- a/src/login-common/login-proxy.c +++ b/src/login-common/login-proxy.c @@ -850,7 +850,8 @@ static bool director_username_hash(struct client *client, unsigned int *hash_r) client->set->director_username_hash, &client->director_username_hash_cache, &error)) { - i_error("Failed to expand director_username_hash=%s: %s", + e_error(client->event, + "Failed to expand director_username_hash=%s: %s", client->set->director_username_hash, error); return FALSE; }