Commit 24d6ae8b authored by Max Kellermann's avatar Max Kellermann

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.
parent 3f2ed33f
...@@ -34,14 +34,14 @@ static int zeroconfEnabled; ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment