zeroconf: skip initialisation if there is no port
This commit is contained in:
parent
5540fbaec2
commit
652cfb7caf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user