From 712ecaa057b431ab141bb9864096d6fa49d6c581 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 7 Dec 2012 19:04:20 +0000 Subject: [PATCH] Stop passing "http" to getaddrinfo in the case when we only need an IP address. It's legal to pass NULL as a service string, so I don't know why I didn't do that in the first place. git-svn-id: svn://svn.tartarus.org/sgt/agedu@9722 cda61777-01e9-0310-a592-d414129be87e --- httpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpd.c b/httpd.c index daaea67..608287e 100644 --- a/httpd.c +++ b/httpd.c @@ -570,7 +570,7 @@ static int make_listening_sockets(struct listenfds *fds, const char *address, hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = 0; hints.ai_flags = AI_PASSIVE; - ret = getaddrinfo(address, portstr ? portstr : "http", &hints, &addrs); + ret = getaddrinfo(address, portstr, &hints, &addrs); if (ret) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(ret)); return -1; -- 2.11.0