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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user