From d0551273646b1f26126a5311db4efd4e4cd847f1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 27 Mar 2008 23:16:29 +0000 Subject: merge r2083 from trunk git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/prepare-0.9.10@2147 fefdeb5f-60dc-0310-8127-8f9354f1896f --- configure.ac | 6 ++++++ src/modules/module-protocol-stub.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 30a14710..aa0922ee 100644 --- a/configure.ac +++ b/configure.ac @@ -982,6 +982,12 @@ fi 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) 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 -- cgit