From: sergey.kitov Date: Wed, 4 Oct 2023 11:58:33 +0000 (+0300) Subject: imap: change imap_client_workarounds to BOOLLIST. X-Git-Tag: 2.4.1~870 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f793b1398ee0f7b74bceb9c7afdbc40c81de4f52;p=thirdparty%2Fdovecot%2Fcore.git imap: change imap_client_workarounds to BOOLLIST. --- diff --git a/src/imap/imap-settings.c b/src/imap/imap-settings.c index 17db4f7884..67b3b22490 100644 --- a/src/imap/imap-settings.c +++ b/src/imap/imap-settings.c @@ -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++) { diff --git a/src/imap/imap-settings.h b/src/imap/imap-settings.h index dfa583bf5d..e78a49bf95 100644 --- a/src/imap/imap-settings.h +++ b/src/imap/imap-settings.h @@ -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;