From 9a27b8f0e8a6cd1863c95770777aa2536ec5fbb2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 4 Feb 2009 17:16:13 +0100 Subject: in addition to per-property env vars PULSE_PROP_xxx look for for a stringified PULSE_PROP env var --- src/pulsecore/proplist-util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/pulsecore/proplist-util.c') diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c index 4920c27e..522c7afe 100644 --- a/src/pulsecore/proplist-util.c +++ b/src/pulsecore/proplist-util.c @@ -41,6 +41,7 @@ void pa_init_proplist(pa_proplist *p) { extern char **environ; #endif char **e; + const char *pp; pa_assert(p); @@ -75,6 +76,15 @@ void pa_init_proplist(pa_proplist *p) { } } + if ((pp = getenv("PULSE_PROP"))) { + pa_proplist *t; + + if ((t = pa_proplist_from_string(pp))) { + pa_proplist_update(p, PA_UPDATE_MERGE, t); + pa_proplist_free(t); + } + } + if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_ID)) { char t[32]; pa_snprintf(t, sizeof(t), "%lu", (unsigned long) getpid()); -- cgit