From 24d6ae8bea0790518c1f7f5a882501fb01084195 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 27 Jan 2009 20:17:44 +0100 Subject: [PATCH] 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. --- src/zeroconf.c | 4 ++-- 1 file 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);