diff options
author | Max Kellermann <max@duempel.org> | 2009-01-27 20:17:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-27 20:17:44 +0100 |
commit | 24d6ae8bea0790518c1f7f5a882501fb01084195 (patch) | |
tree | e657c7a5ff4bcb5b1b6fcb11fc150c698b05620e /src/zeroconf.c | |
parent | 3f2ed33f571c1e7b1276e7cf6c9399eabec9d8b9 (diff) | |
download | mpd-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.c | 4 |
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); |