aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/listen.c7
-rw-r--r--src/listen.h4
-rw-r--r--src/zeroconf.c2
3 files changed, 4 insertions, 9 deletions
diff --git a/src/listen.c b/src/listen.c
index 323bf430f..9d105e815 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -48,7 +48,7 @@
static int *listenSockets;
static int numberOfListenSockets;
-static int boundPort;
+int boundPort;
static int establishListen(unsigned int port,
struct sockaddr *addrp, socklen_t addrlen)
@@ -251,8 +251,3 @@ void getConnections(fd_set * fds)
}
}
}
-
-int getBoundPort(void)
-{
- return boundPort;
-}
diff --git a/src/listen.h b/src/listen.h
index 638214003..d7c2d3639 100644
--- a/src/listen.h
+++ b/src/listen.h
@@ -26,6 +26,8 @@
#include <unistd.h>
#include <sys/select.h>
+extern int boundPort;
+
void listenOnPort(void);
void getConnections(fd_set * fds);
@@ -36,6 +38,4 @@ void freeAllListenSockets(void);
/* fdmax should be initialized to something */
void addListenSocketsToFdSet(fd_set * fds, int *fdmax);
-int getBoundPort(void);
-
#endif
diff --git a/src/zeroconf.c b/src/zeroconf.c
index eeec794cd..6c2c8e717 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -255,7 +255,7 @@ static void avahiRegisterService(AvahiClient *c)
AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0,
avahiName, SERVICE_TYPE,
NULL, NULL,
- getBoundPort(),
+ boundPort,
NULL);
if( ret < 0 ) {
ERROR( "Avahi: Failed to add service %s: %s\n", SERVICE_TYPE, avahi_strerror(ret) );