conf: improved boolean config parameter handling from -ke
the force flag will issue FATAL() if an invalid value is specified git-svn-id: https://svn.musicpd.org/mpd/trunk@6857 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -558,11 +558,9 @@ void initZeroconf(void)
|
||||
const char *serviceName = SERVICE_NAME;
|
||||
ConfigParam *param;
|
||||
|
||||
zeroconfEnabled = getBoolConfigParam(CONF_ZEROCONF_ENABLED);
|
||||
if (zeroconfEnabled == -1)
|
||||
zeroconfEnabled = getBoolConfigParam(CONF_ZEROCONF_ENABLED, 1);
|
||||
if (zeroconfEnabled == CONF_BOOL_UNSET)
|
||||
zeroconfEnabled = DEFAULT_ZEROCONF_ENABLED;
|
||||
else if (zeroconfEnabled < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
if (!zeroconfEnabled)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user