pw_context_parse_conf_section: use the conf argument instead of the context's conf

The conf argument was unused before, but it is correctly populated
using the context's conf in pw_context_new(), so the code behaves
the same effectively.

This allows parsing standard conf sections from other configuration
sources, as long as the sections are placed in a dictionary.
This commit is contained in:
George Kiagiadakis 2024-02-28 11:44:25 +02:00
parent 8cf5bbf658
commit 0912201664

View file

@ -1225,16 +1225,16 @@ int pw_context_parse_conf_section(struct pw_context *context,
int res;
if (spa_streq(section, "context.spa-libs"))
res = pw_context_conf_section_for_each(context, section,
res = pw_conf_section_for_each(&conf->dict, section,
parse_spa_libs, &data);
else if (spa_streq(section, "context.modules"))
res = pw_context_conf_section_for_each(context, section,
res = pw_conf_section_for_each(&conf->dict, section,
parse_modules, &data);
else if (spa_streq(section, "context.objects"))
res = pw_context_conf_section_for_each(context, section,
res = pw_conf_section_for_each(&conf->dict, section,
parse_objects, &data);
else if (spa_streq(section, "context.exec"))
res = pw_context_conf_section_for_each(context, section,
res = pw_conf_section_for_each(&conf->dict, section,
parse_exec, &data);
else
res = -EINVAL;