]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: change imap_client_workarounds to BOOLLIST.
authorsergey.kitov <sergey.kitov@open-xchange.com>
Wed, 4 Oct 2023 11:58:33 +0000 (14:58 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:13 +0000 (12:34 +0200)
src/imap/imap-settings.c
src/imap/imap-settings.h

index 17db4f7884c372d2c1c60e8d211c447934905e1b..67b3b22490c57885783f2613cbba43057b7db313 100644 (file)
@@ -61,7 +61,7 @@ static const struct setting_define imap_setting_defines[] = {
        DEF(SIZE_HIDDEN, imap_max_line_length),
        DEF(TIME_HIDDEN, imap_idle_notify_interval),
        DEF(STR, imap_capability),
-       DEF(STR, imap_client_workarounds),
+       DEF(BOOLLIST, imap_client_workarounds),
        DEF(STR_NOVARS, imap_logout_format),
        DEF(ENUM, imap_fetch_failure),
        DEF(BOOL, imap_metadata),
@@ -89,7 +89,7 @@ static const struct imap_settings imap_default_settings = {
        .imap_max_line_length = 64*1024,
        .imap_idle_notify_interval = 2*60,
        .imap_capability = "",
-       .imap_client_workarounds = "",
+       .imap_client_workarounds = ARRAY_INIT,
        .imap_logout_format = "in=%i out=%o deleted=%{deleted} "
                "expunged=%{expunged} trashed=%{trashed} "
                "hdr_count=%{fetch_hdr_count} hdr_bytes=%{fetch_hdr_bytes} "
@@ -146,7 +146,7 @@ imap_settings_parse_workarounds(struct imap_settings *set,
         const struct imap_client_workaround_list *list;
        const char *const *str;
 
-        str = t_strsplit_spaces(set->imap_client_workarounds, " ,");
+       str = settings_boollist_get(&set->imap_client_workarounds);
        for (; *str != NULL; str++) {
                list = imap_client_workaround_list;
                for (; list->name != NULL; list++) {
index dfa583bf5da9d34af74702fea187d4762293524c..e78a49bf95753d26f1c4ebe098633758a685ae77 100644 (file)
@@ -28,7 +28,7 @@ struct imap_settings {
        uoff_t imap_max_line_length;
        unsigned int imap_idle_notify_interval;
        const char *imap_capability;
-       const char *imap_client_workarounds;
+       ARRAY_TYPE(const_string) imap_client_workarounds;
        const char *imap_logout_format;
        const char *imap_fetch_failure;
        bool imap_metadata;