From: Marco Bettini Date: Wed, 31 Aug 2022 07:25:32 +0000 (+0000) Subject: doveadm: dsync-mailbox-export - Replace i_() with e_() X-Git-Tag: 2.4.0~3558 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7d4117d2baa4992cde45cf5e3a6a40da4ff3aa8;p=thirdparty%2Fdovecot%2Fcore.git doveadm: dsync-mailbox-export - Replace i_() with e_() --- diff --git a/src/doveadm/dsync/dsync-brain-mailbox.c b/src/doveadm/dsync/dsync-brain-mailbox.c index e7ef0c746a..5ce5f60e8b 100644 --- a/src/doveadm/dsync/dsync-brain-mailbox.c +++ b/src/doveadm/dsync/dsync-brain-mailbox.c @@ -353,7 +353,8 @@ int dsync_brain_sync_mailbox_open(struct dsync_brain *brain, last_common_uid, exporter_flags, brain->hdr_hash_version, - brain->hashed_headers); + brain->hashed_headers, + brain->event); dsync_brain_sync_mailbox_init_remote(brain, remote_dsync_box); return 1; } diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 27caed6aa4..f701af9336 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -20,6 +20,7 @@ struct dsync_mail_guid_instances { struct dsync_mailbox_exporter { pool_t pool; + struct event *event; struct mailbox *box; struct dsync_transaction_log_scan *log_scan; uint32_t last_common_uid; @@ -504,7 +505,8 @@ dsync_mailbox_export_init(struct mailbox *box, uint32_t last_common_uid, enum dsync_mailbox_exporter_flags flags, unsigned int hdr_hash_version, - const char *const *hashed_headers) + const char *const *hashed_headers, + struct event *parent_event) { struct dsync_mailbox_exporter *exporter; pool_t pool; @@ -530,6 +532,7 @@ dsync_mailbox_export_init(struct mailbox *box, exporter->no_hdr_hashes = (flags & DSYNC_MAILBOX_EXPORTER_FLAG_NO_HDR_HASHES) != 0; exporter->hashed_headers = hashed_headers; + exporter->event = event_create(parent_event); p_array_init(&exporter->requested_uids, pool, 16); p_array_init(&exporter->search_uids, pool, 16); @@ -641,7 +644,8 @@ dsync_mailbox_export_iter_next_attr(struct dsync_mailbox_exporter *exporter) if (attr_change != NULL && attr_change->exported) { /* duplicate attribute returned. shouldn't normally happen, but don't crash. */ - i_warning("Ignoring duplicate attributes '%s'", key); + e_warning(exporter->event, + "Ignoring duplicate attributes '%s'", key); continue; } @@ -948,6 +952,7 @@ int dsync_mailbox_export_deinit(struct dsync_mailbox_exporter **_exporter, *error_r = exporter->mail_error; *errstr_r = t_strdup(exporter->error); + event_unref(&exporter->event); pool_unref(&exporter->pool); return *errstr_r != NULL ? -1 : 0; } diff --git a/src/doveadm/dsync/dsync-mailbox-export.h b/src/doveadm/dsync/dsync-mailbox-export.h index 67e3216ad4..dfa6f029cc 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.h +++ b/src/doveadm/dsync/dsync-mailbox-export.h @@ -16,7 +16,8 @@ dsync_mailbox_export_init(struct mailbox *box, uint32_t last_common_uid, enum dsync_mailbox_exporter_flags flags, unsigned int hdr_hash_version, - const char *const *hashed_headers); + const char *const *hashed_headers, + struct event *parent_event); /* Returns 1 if attribute was returned, 0 if no more attributes, -1 on error */ int dsync_mailbox_export_next_attr(struct dsync_mailbox_exporter *exporter, const struct dsync_mailbox_attribute **attr_r);