keys: let env variables overwrite the keys

This commit is contained in:
Wim Taymans 2020-07-22 11:25:19 +02:00
parent 2955182e4e
commit 2bb1d88fbe
3 changed files with 10 additions and 10 deletions

View file

@ -39,12 +39,11 @@
static const char *
get_remote(const struct spa_dict *props)
{
const char *name = NULL;
const char *name;
if (props)
name = getenv("PIPEWIRE_REMOTE");
if (props && name == NULL)
name = spa_dict_lookup(props, PW_KEY_REMOTE_NAME);
if (name == NULL)
name = getenv("PIPEWIRE_REMOTE");
if (name == NULL)
name = "pipewire-0";
return name;