[pulseaudio-commits] r2175 - in /branches/prepare-0.9.10/src: daemon/daemon.conf.in daemon/default.pa.in pulsecore/cli-command.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Mar 27 16:39:11 PDT 2008
Author: lennart
Date: Fri Mar 28 00:39:10 2008
New Revision: 2175
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2175&root=pulseaudio&view=rev
Log:
merge r2132 from trunk
Modified:
branches/prepare-0.9.10/src/daemon/daemon.conf.in
branches/prepare-0.9.10/src/daemon/default.pa.in
branches/prepare-0.9.10/src/pulsecore/cli-command.c
Modified: branches/prepare-0.9.10/src/daemon/daemon.conf.in
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/prepare-0.9.10/src/daemon/daemon.conf.in?rev=2175&root=pulseaudio&r1=2174&r2=2175&view=diff
==============================================================================
--- branches/prepare-0.9.10/src/daemon/daemon.conf.in (original)
+++ branches/prepare-0.9.10/src/daemon/daemon.conf.in Fri Mar 28 00:39:10 2008
@@ -38,7 +38,7 @@
; module-idle-time = 20
; scache-idle-time = 20
-; dl-search-path = @PA_DLSEARCHPATH@
+; dl-search-path = (depends on architecture)
; default-script-file = @PA_DEFAULT_CONFIG_FILE@
Modified: branches/prepare-0.9.10/src/daemon/default.pa.in
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/prepare-0.9.10/src/daemon/default.pa.in?rev=2175&root=pulseaudio&r1=2174&r2=2175&view=diff
==============================================================================
--- branches/prepare-0.9.10/src/daemon/default.pa.in (original)
+++ branches/prepare-0.9.10/src/daemon/default.pa.in Fri Mar 28 00:39:10 2008
@@ -37,7 +37,7 @@
#load-module module-pipe-sink
### Automatically load driver modules depending on the hardware available
-.ifexists @PA_DLSEARCHPATH@/module-hal-detect at PA_SOEXT@
+.ifexists module-hal-detect at PA_SOEXT@
load-module module-hal-detect
.else
### Alternatively use the static hardware detection module (for systems that
@@ -79,7 +79,7 @@
#load-module module-x11-bell sample=x11-bell
### Publish connection data in the X11 root window
-.ifexists @PA_DLSEARCHPATH@/module-x11-publish at PA_SOEXT@
+.ifexists module-x11-publish at PA_SOEXT@
load-module module-x11-publish
.endif
@@ -91,7 +91,7 @@
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
-.ifexists @PA_DLSEARCHPATH@/module-gconf at PA_SOEXT@
+.ifexists module-gconf at PA_SOEXT@
load-module module-gconf
.endif
Modified: branches/prepare-0.9.10/src/pulsecore/cli-command.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/prepare-0.9.10/src/pulsecore/cli-command.c?rev=2175&root=pulseaudio&r1=2174&r2=2175&view=diff
==============================================================================
--- branches/prepare-0.9.10/src/pulsecore/cli-command.c (original)
+++ branches/prepare-0.9.10/src/pulsecore/cli-command.c Fri Mar 28 00:39:10 2008
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
+#include <ltdl.h>
#include <pulse/xmalloc.h>
@@ -1315,8 +1316,35 @@
} else {
const char *filename = cs+l+strspn(cs+l, whitespace);
- *ifstate = access(filename, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
- pa_log_debug("Checking for existance of '%s': %s", filename, *ifstate == IFSTATE_TRUE ? "success" : "failure");
+ /* Search DL_SEARCH_PATH unless the filename is absolute */
+ if (filename[0] == PA_PATH_SEP_CHAR) {
+
+ *ifstate = access(filename, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
+ pa_log_debug("Checking for existance of '%s': %s", filename, *ifstate == IFSTATE_TRUE ? "success" : "failure");
+
+ } else {
+ const char *paths, *state = NULL;
+ char *p;
+
+ if (!(paths = lt_dlgetsearchpath()))
+ return -1;
+
+ while ((p = pa_split(paths, ":", &state))) {
+ char *pathname;
+
+ pathname = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", p, filename);
+ pa_xfree(p);
+
+ *ifstate = access(pathname, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
+ pa_log_debug("Checking for existance of '%s': %s", pathname, *ifstate == IFSTATE_TRUE ? "success" : "failure");
+
+ pa_xfree(pathname);
+
+ if (*ifstate == IFSTATE_TRUE)
+ break;
+ }
+ }
+
}
} else {
pa_strbuf_printf(buf, "Invalid meta command: %s\n", cs);
More information about the pulseaudio-commits
mailing list