mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
conf: always fail when loading specified config name
When a config name was given and it fails to load, don't fall back to client.conf but return the error. Only load client.conf when nothing else was specified.
This commit is contained in:
parent
11df633b9b
commit
52a3717693
1 changed files with 5 additions and 6 deletions
|
|
@ -1028,15 +1028,14 @@ int pw_conf_load_conf_for_context(struct pw_properties *props, struct pw_propert
|
||||||
conf_name = getenv("PIPEWIRE_CONFIG_NAME");
|
conf_name = getenv("PIPEWIRE_CONFIG_NAME");
|
||||||
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
||||||
conf_name = pw_properties_get(props, PW_KEY_CONFIG_NAME);
|
conf_name = pw_properties_get(props, PW_KEY_CONFIG_NAME);
|
||||||
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
if (conf_name == NULL)
|
||||||
conf_name = "client.conf";
|
conf_name = "client.conf";
|
||||||
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
||||||
pw_log_error("can't load default config %s: %s",
|
pw_log_error("can't load config %s: %s",
|
||||||
conf_name, spa_strerror(res));
|
conf_name, spa_strerror(res));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
conf_name = pw_properties_get(props, PW_KEY_CONFIG_OVERRIDE_NAME);
|
conf_name = pw_properties_get(props, PW_KEY_CONFIG_OVERRIDE_NAME);
|
||||||
if (conf_name != NULL) {
|
if (conf_name != NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue