From 2ad1dff5392e1626d714f49346ee20fb74e742ae Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 Apr 2006 01:48:56 +0000 Subject: reconnect if the DBUS daemon kicks avahi-daemon. Since the DBUS system bus socket resides outside the chroot() environment this will definitely fail if you enable chroot(). In short: this is probably not what most people want to use. (closes #25) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1197 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'avahi-daemon/main.c') diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index f32cbd6..a9dfb42 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -743,13 +743,12 @@ static int run_server(DaemonConfig *c) { #ifdef HAVE_DBUS if (c->enable_dbus) { - if (dbus_protocol_setup(poll_api, config.disable_user_service_publishing) < 0) { + if (dbus_protocol_setup(poll_api, config.disable_user_service_publishing, !c->fail_on_missing_dbus && !config.use_chroot) < 0) { + + avahi_log_warn("WARNING: Failed to contact D-BUS daemon."); if (c->fail_on_missing_dbus) goto finish; - - avahi_log_warn("WARNING: Failed to contact D-BUS daemon, disabling D-BUS support."); - c->enable_dbus = 0; } } #endif -- cgit