]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Fix using named filters in overrides
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 23 Jan 2025 20:50:45 +0000 (22:50 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:16 +0000 (12:34 +0200)
SETTINGS_EVENT_FILTER_NAME has to be either in event pointers or as strlist
type. Here it was a string type, which was just ignored.

src/lib-settings/settings.c

index f90b9f4e21fad31cc343c4ec4aa884f8dea867dd..33c1481521d007bbecc5a71ec371624faec5339f 100644 (file)
@@ -1553,9 +1553,9 @@ settings_override_filter_match(struct settings_apply_ctx *ctx,
                        last_filter_value = NULL;
                        str_printfa(filter_string, SETTINGS_EVENT_FILTER_NAME"=\"%s\"",
                                    wildcard_str_escape(last_filter_key));
-                       event_add_str(set->filter_event,
-                                     SETTINGS_EVENT_FILTER_NAME,
-                                     last_filter_key);
+                       event_strlist_append(set->filter_event,
+                                            SETTINGS_EVENT_FILTER_NAME,
+                                            last_filter_key);
                        break;
                case SET_FILTER_ARRAY: {
                        const char *value = p + 1;