spa: support: log: always set spa_log_topic::has_custom_level

Always set `spa_log_topic::has_custom_level` so that things work
out as expected even if it is reinitialized or similar.
This commit is contained in:
Barnabás Pőcze 2023-10-06 11:23:26 +02:00 committed by Wim Taymans
parent 03901dec2c
commit 96a280497d

View file

@ -22,6 +22,7 @@ support_log_topic_init(struct spa_list *patterns, enum spa_log_level default_lev
struct spa_log_topic *t)
{
enum spa_log_level level = default_level;
bool has_custom_level = false;
const char *topic = t->topic;
struct support_log_pattern *pattern;
@ -29,10 +30,11 @@ support_log_topic_init(struct spa_list *patterns, enum spa_log_level default_lev
if (fnmatch(pattern->pattern, topic, 0) != 0)
continue;
level = pattern->level;
t->has_custom_level = true;
has_custom_level = true;
}
t->level = level;
t->has_custom_level = has_custom_level;
}
int