[pulseaudio-commits] r2132 - in /trunk/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 13:52:59 PDT 2008


Author: lennart
Date: Thu Mar 27 21:52:59 2008
New Revision: 2132

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2132&root=pulseaudio&view=rev
Log:
Attempt to resolve the multilib conflicts by getting all the config files
look equally for all plattforms.  This includes getting rid go pathnames
with libdir; let's make ps search for files with relative paths there.

https://bugzilla.redhat.com/show_bug.cgi?id=228383

Modified patch, originally from Lubomir Kundrak <lkundrak at redhat.com>


Modified:
    trunk/src/daemon/daemon.conf.in
    trunk/src/daemon/default.pa.in
    trunk/src/pulsecore/cli-command.c

Modified: trunk/src/daemon/daemon.conf.in
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/daemon.conf.in?rev=2132&root=pulseaudio&r1=2131&r2=2132&view=diff
==============================================================================
--- trunk/src/daemon/daemon.conf.in (original)
+++ trunk/src/daemon/daemon.conf.in Thu Mar 27 21:52:59 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: trunk/src/daemon/default.pa.in
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/default.pa.in?rev=2132&root=pulseaudio&r1=2131&r2=2132&view=diff
==============================================================================
--- trunk/src/daemon/default.pa.in (original)
+++ trunk/src/daemon/default.pa.in Thu Mar 27 21:52:59 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: trunk/src/pulsecore/cli-command.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/cli-command.c?rev=2132&root=pulseaudio&r1=2131&r2=2132&view=diff
==============================================================================
--- trunk/src/pulsecore/cli-command.c (original)
+++ trunk/src/pulsecore/cli-command.c Thu Mar 27 21:52:59 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