From: Trent Lloyd Date: Tue, 23 Aug 2005 15:28:28 +0000 (+0000) Subject: * Don't barf on enable-dbus if not compiled with dbus, but print a warning if the... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=b650dd11480e9cb6691e8e55974faa65b2eddcc8;p=catta * Don't barf on enable-dbus if not compiled with dbus, but print a warning if the config file requested to enable it git-svn-id: file:///home/lennart/svn/public/avahi/trunk@419 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 4c3a069..c063d22 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -383,7 +383,6 @@ static int load_config_file(DaemonConfig *c) { c->server_config.check_response_ttl = is_yes(p->value); else if (strcasecmp(p->key, "use-iff-running") == 0) c->server_config.use_iff_running = is_yes(p->value); -#ifdef HAVE_DBUS else if (strcasecmp(p->key, "enable-dbus") == 0) { if (*(p->value) == 'w' || *(p->value) == 'W') { @@ -392,11 +391,14 @@ static int load_config_file(DaemonConfig *c) { } else if (*(p->value) == 'y' || *(p->value) == 'Y') { c->fail_on_missing_dbus = 1; c->enable_dbus = 1; - } else + } else { c->enable_dbus = 0; - - } + } +#ifdef HAVE_DBUS + if (c->enable_dbus == 1) + avahi_log_warning("Avahi was compiled without d-bus support but you requested it was enabled in the config file"); #endif + } else if (strcasecmp(p->key, "drop-root") == 0) c->drop_root = is_yes(p->value); else {