aboutsummaryrefslogtreecommitdiffstats
path: root/src/zeroconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zeroconf.c')
-rw-r--r--src/zeroconf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c
index 907eb8bfc..4a399e4a2 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -21,6 +21,7 @@
#include "zeroconf.h"
#include "zeroconf-internal.h"
#include "conf.h"
+#include "listen.h"
#include <glib.h>
@@ -42,6 +43,12 @@ void initZeroconf(void)
if (!zeroconfEnabled)
return;
+ if (listen_port <= 0) {
+ g_warning("No global port, disabling zeroconf");
+ zeroconfEnabled = false;
+ return;
+ }
+
serviceName = config_get_string(CONF_ZEROCONF_NAME, SERVICE_NAME);
#ifdef HAVE_AVAHI