summaryrefslogtreecommitdiffstats
path: root/server/listen.c
diff options
context:
space:
mode:
authorBen Laurie <ben@apache.org>1999-09-18 13:48:17 +0200
committerBen Laurie <ben@apache.org>1999-09-18 13:48:17 +0200
commit36e163d83cf0d86427a09825211387413f6877ba (patch)
tree37828f06fef30a23ef084e4595abda8173e66256 /server/listen.c
parentInstead of blocking all signals in child_main, we were unblocking them; (diff)
downloadapache2-36e163d83cf0d86427a09825211387413f6877ba.tar.xz
apache2-36e163d83cf0d86427a09825211387413f6877ba.zip
Make ap_getipaddr threadsafe.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83906 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/listen.c')
-rw-r--r--server/listen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/listen.c b/server/listen.c
index e151155ff3..125d2dc88c 100644
--- a/server/listen.c
+++ b/server/listen.c
@@ -153,13 +153,13 @@ static void alloc_listener(char *addr, unsigned int port)
{
ap_listen_rec **walk;
ap_listen_rec *new;
- char *oldaddr;
+ char oldaddr[17];
unsigned int oldport;
/* see if we've got an old listener for this address:port */
for (walk = &old_listeners; *walk; walk = &(*walk)->next) {
ap_getport((*walk)->sd, &oldport);
- ap_getipaddr((*walk)->sd, &oldaddr);
+ ap_getipaddr(oldaddr,sizeof oldaddr,(*walk)->sd);
if (!strcmp(oldaddr, addr) && port == oldport) {
/* re-use existing record */
new = *walk;