summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorDiego Petteno <flameeyes@gmail.com>2007-12-06 19:30:16 +0000
committerDiego Petteno <flameeyes@gmail.com>2007-12-06 19:30:16 +0000
commitb94a6bc5b8328763c62a5b8687431b25c036b6dc (patch)
tree2d07de45d9aea193cff6073bb2cfab69a9617a60 /src/modules
parent95a98fe6f2002c9dd448b70bb6944541b5616df3 (diff)
Add a configure switch to enable the per-user ESounD socket path, but default to vanilla ESounD's path. This way distributions and users can configure PulseAudio according to their ESounD library.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2083 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-protocol-stub.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c
index 207e266e..a9bd850b 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -218,7 +218,11 @@ int pa__init(pa_module*m) {
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
@@ -265,8 +269,10 @@ int pa__init(pa_module*m) {
#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