context: add a function to merge config properties

Add a function that takes a section and merges the properties into
a target properties. Replace some usage of get_config_section().
This commit is contained in:
Wim Taymans 2022-02-01 15:11:45 +01:00
parent 6149c01b51
commit 65c487564b
5 changed files with 24 additions and 11 deletions

View file

@ -3150,9 +3150,8 @@ jack_client_t * jack_client_open (const char *client_name,
client->allow_mlock = client->context.context->settings.mem_allow_mlock;
client->warn_mlock = client->context.context->settings.mem_warn_mlock;
if ((str = pw_context_get_conf_section(client->context.context,
"jack.properties")) != NULL)
pw_properties_update_string(client->props, str, strlen(str));
pw_context_conf_update_props(client->context.context,
"jack.properties", client->props);
if ((str = getenv("PIPEWIRE_PROPS")) != NULL)
pw_properties_update_string(client->props, str, strlen(str));