aboutsummaryrefslogtreecommitdiffstats
path: root/src/zeroconf.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-27 20:17:44 +0100
committerMax Kellermann <max@duempel.org>2009-01-27 20:17:44 +0100
commit24d6ae8bea0790518c1f7f5a882501fb01084195 (patch)
treee657c7a5ff4bcb5b1b6fcb11fc150c698b05620e /src/zeroconf.c
parent3f2ed33f571c1e7b1276e7cf6c9399eabec9d8b9 (diff)
downloadmpd-24d6ae8bea0790518c1f7f5a882501fb01084195.tar.gz
mpd-24d6ae8bea0790518c1f7f5a882501fb01084195.tar.xz
mpd-24d6ae8bea0790518c1f7f5a882501fb01084195.zip
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.
Diffstat (limited to 'src/zeroconf.c')
-rw-r--r--src/zeroconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c
index 54bab6551..d52f4a275 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -34,14 +34,14 @@ static int zeroconfEnabled;
void initZeroconf(void)
{
- const char *serviceName = SERVICE_NAME;
+ const char *serviceName;
zeroconfEnabled = config_get_bool(CONF_ZEROCONF_ENABLED,
DEFAULT_ZEROCONF_ENABLED);
if (!zeroconfEnabled)
return;
- serviceName = config_get_string(CONF_ZEROCONF_NAME, NULL);
+ serviceName = config_get_string(CONF_ZEROCONF_NAME, SERVICE_NAME);
#ifdef HAVE_AVAHI
init_avahi(serviceName);