diff options
author | Patrik Weiskircher <pat@icore.at> | 2007-06-03 18:08:51 +0000 |
---|---|---|
committer | Patrik Weiskircher <pat@icore.at> | 2007-06-03 18:08:51 +0000 |
commit | d67737bc6499545e2a372b732a578ebc28128cc2 (patch) | |
tree | 305ea0c3a6300550306c0118ac7743d7c53543ee /src/zeroconf.c | |
parent | 4025498488edc9e405abe21dc633b48911dcd1d9 (diff) | |
download | mpd-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.c | 9 |
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 ); |