summaryrefslogtreecommitdiff
blob: 317d39a59cb36a79448194e096aea989580ebca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Index: src/modules/module-protocol-stub.c
===================================================================
--- src/modules/module-protocol-stub.c	(revision 2082)
+++ src/modules/module-protocol-stub.c	(working copy)
@@ -218,9 +218,13 @@
     char tmp[PATH_MAX];
 
 #if defined(USE_PROTOCOL_ESOUND)
-    char tmp2[PATH_MAX];
+#if defined(USE_PERUSER_ESOUND_SOCKET)
+    char esdsocketpath[PATH_MAX];
+#else
+    const char esdsocketpath[] = "/tmp/.esd/socket";
 #endif
 #endif
+#endif
 
     pa_assert(m);
 
@@ -265,8 +269,10 @@
 
 #if defined(USE_PROTOCOL_ESOUND)
 
-    snprintf(tmp2, sizeof(tmp2), "/tmp/.esd-%lu/socket", (unsigned long) getuid());
-    pa_runtime_path(pa_modargs_get_value(ma, "socket", tmp2), tmp, sizeof(tmp));
+#if defined(USE_PERUSER_ESOUND_SOCKET)
+    snprintf(esdsocketpath, sizeof(esdsocketpath), "/tmp/.esd-%lu/socket", (unsigned long) getuid());
+#endif
+    pa_runtime_path(pa_modargs_get_value(ma, "socket", esdsocketpath), tmp, sizeof(tmp));
     u->socket_path = pa_xstrdup(tmp);
 
     /* This socket doesn't reside in our own runtime dir but in
Index: configure.ac
===================================================================
--- configure.ac	(revision 2082)
+++ configure.ac	(working copy)
@@ -982,6 +982,12 @@
 AC_SUBST(PA_ACCESS_GROUP)
 AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
 
+AC_ARG_WITH(peruser_esound, AS_HELP_STRING([--with-peruser-esound-socket], [Use per-user esound socket directory, like /tmp/.esd-UID/socket.]))
+
+if test "x$with_peruser_esound" = "xyes"; then
+   AC_DEFINE([USE_PERUSER_ESOUND_SOCKET], [1], [Define this if you want per-user esound socket directories])
+fi
+
 #### PulseAudio system runtime dir ####
 PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
 AC_SUBST(PA_SYSTEM_RUNTIME_PATH)