From: Timo Sirainen Date: Wed, 3 Dec 2025 00:46:21 +0000 (+0200) Subject: imapc: Fix sending UID STORE commands X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=245f45d6a9e5aceadd0d7d0c3450c884c29aff7d;p=thirdparty%2Fdovecot%2Fcore.git imapc: Fix sending UID STORE commands The uidset parameter always ended with a comma, which isn't valid IMAP protocol. --- diff --git a/src/lib-storage/index/imapc/imapc-save.c b/src/lib-storage/index/imapc/imapc-save.c index b025faa7ce..b44ceaf232 100644 --- a/src/lib-storage/index/imapc/imapc-save.c +++ b/src/lib-storage/index/imapc/imapc-save.c @@ -480,13 +480,13 @@ imapc_rollback_send_expunge(struct imapc_save_context *ctx) uid)) { /* Maximum length is reached send the rollback and wait for it to be finished. */ + seqset_builder_deinit(&seqset_builder); imapc_expunge_send_cmd_str(ctx, uids_str); while (ctx->src_mbox->rollback_pending) imapc_mailbox_run_nofetch(ctx->src_mbox); /* Truncate the uids_str and create a new seqset_builder for the next command */ - seqset_builder_deinit(&seqset_builder); str_truncate(uids_str, 0); seqset_builder = seqset_builder_init(uids_str); /* Make sure the current uid which is part of @@ -494,6 +494,7 @@ imapc_rollback_send_expunge(struct imapc_save_context *ctx) seqset_builder_add(seqset_builder, uid); } } + seqset_builder_deinit(&seqset_builder); if (str_len(uids_str) > 0) imapc_expunge_send_cmd_str(ctx, uids_str); while (ctx->src_mbox->rollback_pending)