]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Remove quota_settings.initialized
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 13 Aug 2024 10:53:56 +0000 (13:53 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:13 +0000 (12:34 +0200)
This was only used for checking whether a debug log message should have been
sent. But if that code was reached, quota must have been initialized.

src/plugins/quota/quota-private.h
src/plugins/quota/quota-util.c
src/plugins/quota/quota.c

index 5d5311cd2ff884476c1283becb23c99d17eaa936..305dc89fb9b448c0f24af41737b59eec646c213f 100644 (file)
@@ -32,7 +32,6 @@ struct quota_settings {
        uoff_t max_mail_size;
        unsigned int max_messages_per_mailbox;
        const char *quota_exceeded_msg;
-       bool initialized:1;
        bool vsizes:1;
 };
 
index e9ff3262c57ccfc02c76fe58ff67c436780d0a95..aed61f2a3be4b5951f50cd9e16712566c15fe603 100644 (file)
@@ -130,13 +130,11 @@ void quota_root_recalculate_relative_rules(struct quota_root_settings *root_set,
                                              bytes_limit, 0);
        root_set->last_mail_max_extra_bytes = root_set->grace_rule.bytes_limit;
 
-       if (root_set->set->initialized) {
-               e_debug(root_set->set->event,
-                       "Quota root %s: Recalculated relative rules with "
-                       "bytes=%lld count=%lld. Now grace=%"PRIu64, root_set->name,
-                       (long long)bytes_limit, (long long)count_limit,
-                       root_set->last_mail_max_extra_bytes);
-       }
+       e_debug(root_set->set->event,
+               "Quota root %s: Recalculated relative rules with "
+               "bytes=%lld count=%lld. Now grace=%"PRIu64, root_set->name,
+               (long long)bytes_limit, (long long)count_limit,
+               root_set->last_mail_max_extra_bytes);
 }
 
 static int
index 64014ad6eac1157ff9f585ca5b92b387ebbd0a95..34fce4a6d8c3b234567111587f5a109ac6eae89b 100644 (file)
@@ -351,7 +351,6 @@ int quota_user_read_settings(struct mail_user *user,
                return 0;
        }
 
-       quota_set->initialized = TRUE;
        *set_r = quota_set;
        return 1;
 }