zeroconf: corrected default service name usage

The variable "serviceName" is initialized with SERVICE_NAME, but was
overwritten with NULL when the setting is not configured.
This commit is contained in:
Max Kellermann 2009-01-27 20:17:44 +01:00
parent 3f2ed33f57
commit 24d6ae8bea
1 changed files with 2 additions and 2 deletions

View File

@ -34,14 +34,14 @@ static int zeroconfEnabled;
void initZeroconf(void) void initZeroconf(void)
{ {
const char *serviceName = SERVICE_NAME; const char *serviceName;
zeroconfEnabled = config_get_bool(CONF_ZEROCONF_ENABLED, zeroconfEnabled = config_get_bool(CONF_ZEROCONF_ENABLED,
DEFAULT_ZEROCONF_ENABLED); DEFAULT_ZEROCONF_ENABLED);
if (!zeroconfEnabled) if (!zeroconfEnabled)
return; return;
serviceName = config_get_string(CONF_ZEROCONF_NAME, NULL); serviceName = config_get_string(CONF_ZEROCONF_NAME, SERVICE_NAME);
#ifdef HAVE_AVAHI #ifdef HAVE_AVAHI
init_avahi(serviceName); init_avahi(serviceName);