add new property PA_PROP_APPLICATION_PROCESS_SESSION_ID and initialize it by default

This commit is contained in:
Lennart Poettering 2009-02-21 16:26:09 +01:00
parent 2d0c68af93
commit 27bfa607b9
2 changed files with 13 additions and 0 deletions

View file

@ -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);
}
}
}