]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Replace AUTOEXPUNGE_BATCH_SIZE with MAIL_EXPUNGE_BATCH_SIZE.
authorsergey.kitov <sergey.kitov@open-xchange.com>
Tue, 15 Mar 2022 14:51:36 +0000 (16:51 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 28 Mar 2022 15:41:32 +0000 (15:41 +0000)
src/lib-storage/mail-autoexpunge.c

index 73e764b02a842b1baf2fed50ca04661fe5d659b1..4837eed069ab705fcb9fae06adf0b52be37c1c10 100644 (file)
@@ -9,7 +9,6 @@
 #include "mail-autoexpunge.h"
 
 #define AUTOEXPUNGE_LOCK_FNAME "dovecot.autoexpunge.lock"
-#define AUTOEXPUNGE_BATCH_SIZE 1000
 
 static bool
 mailbox_autoexpunge_lock(struct mail_user *user, struct file_lock **lock)
@@ -79,7 +78,7 @@ mailbox_autoexpunge_batch(struct mailbox *box,
 
        hdr = mail_index_get_header(box->view);
 
-       for (seq = 1; seq <= I_MIN(hdr->messages_count, AUTOEXPUNGE_BATCH_SIZE); seq++) {
+       for (seq = 1; seq <= I_MIN(hdr->messages_count, MAIL_EXPUNGE_BATCH_SIZE); seq++) {
                mail_set_seq(mail, seq);
                if (max_mails > 0 && hdr->messages_count - seq + 1 > max_mails) {
                        /* max_mails is still being reached -> expunge.