diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-24 14:43:11 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-24 14:43:11 +0300 |
commit | 2f3fc2f1d6ba418303a4bab6f8fd3caed7d291b4 (patch) | |
tree | 00bccb466ce49367f6fd54fe9f7f90557eea8738 /src/daemon | |
parent | 3025645b0b58f476f6404f2aed3b61a633794d10 (diff) | |
parent | be46eaa5b6324d84c5ecbed5dd72dec1c87e0cb1 (diff) |
Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-work
Conflicts:
src/Makefile.am
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/cmdline.c | 5 | ||||
-rw-r--r-- | src/daemon/daemon-conf.c | 20 | ||||
-rw-r--r-- | src/daemon/main.c | 11 |
3 files changed, 25 insertions, 11 deletions
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c index ecb38486..f6cdcdc8 100644 --- a/src/daemon/cmdline.c +++ b/src/daemon/cmdline.c @@ -385,11 +385,6 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d pa_xfree(conf->script_commands); conf->script_commands = pa_strbuf_tostring_free(buf); - if (!conf->script_commands) { - pa_xfree(conf->script_commands); - conf->script_commands = NULL; - } - *d = optind; return 0; diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 31f29009..3428f807 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -136,9 +136,25 @@ static const pa_daemon_conf default_conf = { }; pa_daemon_conf* pa_daemon_conf_new(void) { - pa_daemon_conf *c = pa_xnewdup(pa_daemon_conf, &default_conf, 1); + pa_daemon_conf *c; + + c = pa_xnewdup(pa_daemon_conf, &default_conf, 1); + +#if defined(__linux__) && !defined(__OPTIMIZE__) + + /* We abuse __OPTIMIZE__ as a check whether we are a debug build + * or not. If we are and are run from the build tree then we + * override the search path to point to our build tree */ + + if (pa_run_from_build_tree()) { + pa_log_notice("Detected that we are run from the build tree, fixing search path."); + c->dl_search_path = pa_xstrdup(PA_BUILDDIR "/.libs/"); + + } else + +#endif + c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH); - c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH); return c; } diff --git a/src/daemon/main.c b/src/daemon/main.c index 73696005..409823b1 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -39,8 +39,6 @@ #include <sys/types.h> #include <sys/stat.h> -#include <liboil/liboil.h> - #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> #endif @@ -95,6 +93,8 @@ #ifdef HAVE_DBUS #include <pulsecore/dbus-shared.h> #endif +#include <pulsecore/cpu-arm.h> +#include <pulsecore/cpu-x86.h> #include "cmdline.h" #include "cpulimit.h" @@ -804,6 +804,8 @@ int main(int argc, char *argv[]) { pa_log_info(_("Using state directory %s."), s); pa_xfree(s); + pa_log_info(_("Using modules directory %s."), conf->dl_search_path); + pa_log_info(_("Running in system mode: %s"), pa_yes_no(pa_in_system_mode())); if (pa_in_system_mode()) @@ -851,6 +853,9 @@ int main(int argc, char *argv[]) { pa_memtrap_install(); + pa_cpu_init_x86(); + pa_cpu_init_arm(); + pa_assert_se(mainloop = pa_mainloop_new()); if (!(c = pa_core_new(pa_mainloop_get_api(mainloop), !conf->disable_shm, conf->shm_size))) { @@ -893,8 +898,6 @@ int main(int argc, char *argv[]) { win32_timer = pa_mainloop_get_api(mainloop)->rtclock_time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL); #endif - oil_init(); - if (!conf->no_cpu_limit) pa_assert_se(pa_cpu_limit_init(pa_mainloop_get_api(mainloop)) == 0); |