]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Replace i_error() with e_error() where possible
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Apr 2020 21:37:34 +0000 (00:37 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Apr 2020 08:02:40 +0000 (08:02 +0000)
src/login-common/client-common-auth.c
src/login-common/client-common.c
src/login-common/login-proxy.c

index 70e717d037456eeb66e84c826eb76cb0cae6c3c7..15f1dcccfc39579c102b5e3a9b896612c0f36fa4 100644 (file)
@@ -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 */
index b201a0b95782f72358fd93f3751dbb1777331419..8b9ccb017000fea06e15154610f1652864201068 100644 (file)
@@ -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;
                }
index 900e24bb946b20e0b04d707d4e5d310ad748b768..57d778a4049cc0fe2c12d9a374d1691423d38fa1 100644 (file)
@@ -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;
        }