mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -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
|
|
@ -171,10 +171,9 @@ const char *get_server_name(struct pw_context *context)
|
|||
const char *name = NULL;
|
||||
const struct pw_properties *props = pw_context_get_properties(context);
|
||||
|
||||
if (props)
|
||||
name = getenv("PIPEWIRE_REMOTE");
|
||||
if ((name == NULL || name[0] == '\0') && props != NULL)
|
||||
name = pw_properties_get(props, PW_KEY_REMOTE_NAME);
|
||||
if (name == NULL || name[0] == '\0')
|
||||
name = getenv("PIPEWIRE_REMOTE");
|
||||
if (name == NULL || name[0] == '\0')
|
||||
name = PW_DEFAULT_REMOTE;
|
||||
return name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue