]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Replace i_<log>() with e_<log>()
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 19 Sep 2022 13:19:39 +0000 (13:19 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 26 Oct 2022 16:35:08 +0000 (16:35 +0000)
src/pop3/main.c
src/pop3/pop3-client.c
src/pop3/pop3-commands.c

index cb17108be915bee23d503169dcab29e112328660..c4e19bcbbd6b2e87ed524f644c6439016bdeacbd 100644 (file)
@@ -194,7 +194,7 @@ static int init_namespaces(struct client *client, bool already_logged_in)
                if (!already_logged_in)
                        client_send_line(client, MSG_BYE_INTERNAL_ERROR);
 
-               i_error("%s", error);
+               e_error(client->event, "%s", error);
                client_destroy(client, error);
                return -1;
        }
@@ -247,7 +247,7 @@ static void client_init_session(struct client *client)
        event_reason_end(&reason);
 
        if (ret < 0) {
-               i_error("%s", error);
+               e_error(client->event, "%s", error);
                client_destroy(client, error);
        }
 }
index 5af63ae712cbfc13cad3c3c102cade4889e48bd6..1aa632d6378e004f4dba876e4f6d3b50200b1085 100644 (file)
@@ -351,12 +351,14 @@ int pop3_lock_session(struct client *client)
                                              MAILBOX_LIST_PATH_TYPE_DIR, &dir)) {
                type = MAILBOX_LIST_PATH_TYPE_DIR;
        } else {
-               i_error("pop3_lock_session: Storage has no root/index directory, "
+               e_error(client->event,
+                       "pop3_lock_session: Storage has no root/index directory, "
                        "can't create a POP3 session lock file");
                return -1;
        }
        if (mailbox_list_mkdir_root(client->inbox_ns->list, dir, type) < 0) {
-               i_error("pop3_lock_session: Couldn't create root directory %s: %s",
+               e_error(client->event,
+                       "pop3_lock_session: Couldn't create root directory %s: %s",
                        dir, mailbox_list_get_last_internal_error(client->inbox_ns->list, NULL));
                return -1;
        }
@@ -369,7 +371,8 @@ int pop3_lock_session(struct client *client)
        ret = file_dotlock_create(&dotlock_set, path, 0,
                                  &client->session_dotlock);
        if (ret < 0)
-               i_error("file_dotlock_create(%s) failed: %m", path);
+               e_error(client->event,
+                       "file_dotlock_create(%s) failed: %m", path);
        else if (ret > 0) {
                client->to_session_dotlock_refresh =
                        timeout_add(POP3_SESSION_DOTLOCK_STALE_TIMEOUT_SECS*1000,
@@ -556,7 +559,8 @@ static const char *client_stats(struct client *client)
        if (var_expand_with_funcs(str, client->set->pop3_logout_format,
                                  tab, mail_user_var_expand_func_table,
                                  client->user, &error) <= 0) {
-               i_error("Failed to expand pop3_logout_format=%s: %s",
+               e_error(client->event,
+                       "Failed to expand pop3_logout_format=%s: %s",
                        client->set->pop3_logout_format, error);
        }
        return str_c(str);
@@ -583,7 +587,8 @@ static void client_default_destroy(struct client *client, const char *reason)
                        reason = io_stream_get_disconnect_reason(client->input,
                                                                 client->output);
                }
-               i_info("Disconnected: %s %s", reason, client_stats(client));
+               e_info(client->event,
+                      "Disconnected: %s %s", reason, client_stats(client));
        }
 
        if (client->cmd != NULL) {
index 2619dab44bd3533b01d8f437a3083eb3b5176f3f..ec3af1e78eec393f13563f7a17847fcd7069c634 100644 (file)
@@ -218,7 +218,8 @@ static int client_verify_ordering(struct client *client,
 
        seq = msgnum_to_seq(client, msgnum);
        if (seq != mail->seq) {
-               i_error("Message ordering changed unexpectedly "
+               e_error(client->event,
+                       "Message ordering changed unexpectedly "
                        "(msg #%u: storage seq %u -> %u)",
                        msgnum+1, seq, mail->seq);
                return -1;
@@ -622,11 +623,13 @@ pop3_get_uid(struct client *client, struct mail *mail, string_t *str,
        if ((client->uidl_keymask & UIDL_MD5) != 0) {
                if (mail_get_special(mail, MAIL_FETCH_HEADER_MD5,
                                     &hdr_md5) < 0) {
-                       i_error("UIDL: Header MD5 lookup failed: %s",
+                       e_error(client->event,
+                               "UIDL: Header MD5 lookup failed: %s",
                                mailbox_get_last_internal_error(mail->box, NULL));
                        return -1;
                } else if (hdr_md5[0] == '\0') {
-                       i_error("UIDL: Header MD5 not found "
+                       e_error(client->event,
+                               "UIDL: Header MD5 not found "
                                "(pop3_uidl_format=%%m not supported by storage?)");
                        return -1;
                }
@@ -634,11 +637,13 @@ pop3_get_uid(struct client *client, struct mail *mail, string_t *str,
        if ((client->uidl_keymask & UIDL_FILE_NAME) != 0) {
                if (mail_get_special(mail, MAIL_FETCH_STORAGE_ID,
                                     &filename) < 0) {
-                       i_error("UIDL: File name lookup failed: %s",
+                       e_error(client->event,
+                               "UIDL: File name lookup failed: %s",
                                mailbox_get_last_internal_error(mail->box, NULL));
                        return -1;
                } else if (filename[0] == '\0') {
-                       i_error("UIDL: File name not found "
+                       e_error(client->event,
+                               "UIDL: File name not found "
                                "(pop3_uidl_format=%%f not supported by storage?)");
                        return -1;
                }
@@ -646,11 +651,13 @@ pop3_get_uid(struct client *client, struct mail *mail, string_t *str,
        if ((client->uidl_keymask & UIDL_GUID) != 0) {
                if (mail_get_special(mail, MAIL_FETCH_GUID,
                                     &guid) < 0) {
-                       i_error("UIDL: Message GUID lookup failed: %s",
+                       e_error(client->event,
+                               "UIDL: Message GUID lookup failed: %s",
                                mailbox_get_last_internal_error(mail->box, NULL));
                        return -1;
                } else if (guid[0] == '\0') {
-                       i_error("UIDL: Message GUID not found "
+                       e_error(client->event,
+                               "UIDL: Message GUID not found "
                                "(pop3_uidl_format=%%g not supported by storage?)");
                        return -1;
                }
@@ -668,7 +675,8 @@ pop3_get_uid(struct client *client, struct mail *mail, string_t *str,
 
        if (var_expand(str, client->mail_set->pop3_uidl_format,
                       tab, &error) <= 0) {
-               i_error("UIDL: Failed to expand pop3_uidl_format=%s: %s",
+               e_error(client->event,
+                       "UIDL: Failed to expand pop3_uidl_format=%s: %s",
                        client->mail_set->pop3_uidl_format, error);
                return -1;
        }