mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
env vars should override everything
Always first use the env var and then check the properties. So that PIPEWIRE_CORE=pipewire-1 PIPEWIRE_REMOTE=pipewire-1 make run runs everything on pipewire-1 sockets regardless of the config files. Also PIPEWIRE_NODE always needs to be taken into account first.
This commit is contained in:
parent
782e0dfb1f
commit
c8850f8766
6 changed files with 13 additions and 24 deletions
|
|
@ -1287,10 +1287,9 @@ get_server_name(const struct spa_dict *props)
|
|||
{
|
||||
const char *name = NULL;
|
||||
|
||||
if (props)
|
||||
name = getenv("PIPEWIRE_CORE");
|
||||
if (name == NULL && props != NULL)
|
||||
name = spa_dict_lookup(props, PW_KEY_CORE_NAME);
|
||||
if (name == NULL)
|
||||
name = getenv("PIPEWIRE_CORE");
|
||||
if (name == NULL)
|
||||
name = PW_DEFAULT_REMOTE;
|
||||
return name;
|
||||
|
|
@ -1466,10 +1465,9 @@ static int need_server(struct pw_context *context, const struct spa_dict *props)
|
|||
{
|
||||
const char *val = NULL;
|
||||
|
||||
if (props)
|
||||
val = getenv("PIPEWIRE_DAEMON");
|
||||
if (val == NULL && props != NULL)
|
||||
val = spa_dict_lookup(props, PW_KEY_CORE_DAEMON);
|
||||
if (val == NULL)
|
||||
val = getenv("PIPEWIRE_DAEMON");
|
||||
if (val && pw_properties_parse_bool(val))
|
||||
return 1;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue