diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-02-21 16:26:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-02-21 16:26:09 +0100 |
commit | 27bfa607b90b25aa4fdefc0882091093164297a5 (patch) | |
tree | 4fc8e2b10ce59cdac4d2680d3fb054bdf02316b6 /src/pulsecore/proplist-util.c | |
parent | 2d0c68af933c8d68328d627bf0904365cdc8c86d (diff) |
add new property PA_PROP_APPLICATION_PROCESS_SESSION_ID and initialize it by default
Diffstat (limited to 'src/pulsecore/proplist-util.c')
-rw-r--r-- | src/pulsecore/proplist-util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c index d78eac07..7ba2fd71 100644 --- a/src/pulsecore/proplist-util.c +++ b/src/pulsecore/proplist-util.c @@ -228,4 +228,14 @@ void pa_init_proplist(pa_proplist *p) { pa_xfree(m); } } + + if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_SESSION_ID)) { + const char *t; + + if ((t = getenv("XDG_SESSION_COOKIE"))) { + char *c = pa_utf8_filter(t); + pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_SESSION_ID, c); + pa_xfree(c); + } + } } |