allow zeroconf to be disabled.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Patrik Weiskircher
2007-06-03 18:08:51 +00:00
parent 4025498488
commit d67737bc64
5 changed files with 18 additions and 0 deletions

View File

@@ -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 );