esound r519 - trunk
- From: jmouette svn gnome org
- To: svn-commits-list gnome org
- Subject: esound r519 - trunk
- Date: Tue, 18 Nov 2008 20:23:51 +0000 (UTC)
Author: jmouette
Date: Tue Nov 18 20:23:51 2008
New Revision: 519
URL: http://svn.gnome.org/viewvc/esound?rev=519&view=rev
Log:
* util.c: (esd_get_socket_dirname): support multiple esd
instances (one per user).
Modified:
trunk/ChangeLog
trunk/util.c
Modified: trunk/util.c
==============================================================================
--- trunk/util.c (original)
+++ trunk/util.c Tue Nov 18 20:23:51 2008
@@ -27,15 +27,17 @@
const char *audiodev = NULL;
static char *dirname = NULL;
- if ((audiodev = getenv("AUDIODEV"))) {
- char *newdev = strrchr(audiodev, '/');
- if (newdev != NULL) {
- audiodev = newdev++;
- }
- } else
- audiodev = "";
- dirname = malloc(strlen(audiodev) + 40);
- sprintf (dirname, "/tmp/.esd%s-%i", audiodev, getuid());
+ if (dirname == NULL) {
+ if ((audiodev = getenv("AUDIODEV"))) {
+ char *newdev = strrchr(audiodev, '/');
+ if (newdev != NULL) {
+ audiodev = newdev++;
+ }
+ } else
+ audiodev = "";
+ dirname = malloc(strlen(audiodev) + 40);
+ sprintf (dirname, "/tmp/.esd%s-%i", audiodev, getuid());
+ }
return dirname;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]