mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
core-util: add pa_session_id()
This commit is contained in:
parent
17f1784cb7
commit
1b4e5f197a
2 changed files with 10 additions and 0 deletions
|
|
@ -2502,6 +2502,15 @@ char *pa_machine_id(void) {
|
||||||
return pa_sprintf_malloc("%08lx", (unsigned long) gethostid);
|
return pa_sprintf_malloc("%08lx", (unsigned long) gethostid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *pa_session_id(void) {
|
||||||
|
const char *e;
|
||||||
|
|
||||||
|
if (!(e = getenv("XDG_SESSION_COOKIE")))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return pa_utf8_filter(e);
|
||||||
|
}
|
||||||
|
|
||||||
char *pa_uname_string(void) {
|
char *pa_uname_string(void) {
|
||||||
struct utsname u;
|
struct utsname u;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ pa_bool_t pa_in_system_mode(void);
|
||||||
#define pa_streq(a,b) (!strcmp((a),(b)))
|
#define pa_streq(a,b) (!strcmp((a),(b)))
|
||||||
|
|
||||||
char *pa_machine_id(void);
|
char *pa_machine_id(void);
|
||||||
|
char *pa_session_id(void);
|
||||||
char *pa_uname_string(void);
|
char *pa_uname_string(void);
|
||||||
|
|
||||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue