From: Marco Bettini Date: Mon, 19 Sep 2022 13:19:39 +0000 (+0000) Subject: pop3: Replace i_() with e_() X-Git-Tag: 2.4.0~3497 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f658ae03ee2c356869e4961a4ad9b36a32f97d7;p=thirdparty%2Fdovecot%2Fcore.git pop3: Replace i_() with e_() --- diff --git a/src/pop3/main.c b/src/pop3/main.c index cb17108be9..c4e19bcbbd 100644 --- a/src/pop3/main.c +++ b/src/pop3/main.c @@ -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); } } diff --git a/src/pop3/pop3-client.c b/src/pop3/pop3-client.c index 5af63ae712..1aa632d637 100644 --- a/src/pop3/pop3-client.c +++ b/src/pop3/pop3-client.c @@ -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) { diff --git a/src/pop3/pop3-commands.c b/src/pop3/pop3-commands.c index 2619dab44b..ec3af1e78e 100644 --- a/src/pop3/pop3-commands.c +++ b/src/pop3/pop3-commands.c @@ -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; }