aboutsummaryrefslogtreecommitdiffstats
path: root/src/zeroconf.c
diff options
context:
space:
mode:
authorPatrik Weiskircher <pat@icore.at>2007-06-03 18:08:51 +0000
committerPatrik Weiskircher <pat@icore.at>2007-06-03 18:08:51 +0000
commitd67737bc6499545e2a372b732a578ebc28128cc2 (patch)
tree305ea0c3a6300550306c0118ac7743d7c53543ee /src/zeroconf.c
parent4025498488edc9e405abe21dc633b48911dcd1d9 (diff)
downloadmpd-d67737bc6499545e2a372b732a578ebc28128cc2.tar.gz
mpd-d67737bc6499545e2a372b732a578ebc28128cc2.tar.xz
mpd-d67737bc6499545e2a372b732a578ebc28128cc2.zip
allow zeroconf to be disabled.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/zeroconf.c')
-rw-r--r--src/zeroconf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c
index 585c6e2bf..6dca7e10b 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -549,6 +549,10 @@ void initZeroconf(void)
{
const char* serviceName = SERVICE_NAME;
ConfigParam *param;
+ int enabled = getBoolConfigParam(CONF_ZEROCONF_ENABLED);
+
+ if (enabled != -1 && enabled != 1)
+ return;
param = getConfigParam(CONF_ZEROCONF_NAME);
@@ -566,6 +570,11 @@ void initZeroconf(void)
void finishZeroconf(void)
{
+ int enabled = getBoolConfigParam(CONF_ZEROCONF_ENABLED);
+
+ if (enabled != -1 && enabled != 1)
+ return;
+
#ifdef HAVE_AVAHI
DEBUG( "Avahi: Shutting down interface\n" );
deregisterIO( &zeroConfIo );