aboutsummaryrefslogtreecommitdiffstats
path: root/src/listen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/listen.c')
-rw-r--r--src/listen.c8
1 files changed, 8 insertions, 0 deletions
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;
+}