From 5d79aced8cc587b8b8889647b7cb9da79d500d64 Mon Sep 17 00:00:00 2001 From: Jim Ramsay Date: Thu, 11 Jan 2007 20:41:17 +0000 Subject: Added zeroconf service publishing using avahi git-svn-id: https://svn.musicpd.org/mpd/trunk@5238 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/listen.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/listen.c') diff --git a/src/listen.c b/src/listen.c index 7cc16a2d3..4caf2dc2a 100644 --- a/src/listen.c +++ b/src/listen.c @@ -47,6 +47,7 @@ int *listenSockets = NULL; int numberOfListenSockets = 0; +static int boundPort = 0; static int establishListen(unsigned int port, struct sockaddr *addrp, socklen_t addrlen) @@ -211,6 +212,8 @@ void listenOnPort(void) } } + boundPort = port; + do { parseListenConfigParam(port, param); } while ((param = getNextConfigParam(CONF_BIND_TO_ADDRESS, param))); @@ -266,3 +269,8 @@ void getConnections(fd_set * fds) } } } + +int getBoundPort() +{ + return boundPort; +} -- cgit v1.2.3