Commit b8dafbdf authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Pass NI_NUMERICSERV to getnameinfo to get numeric service name

parent 3b03ff62
...@@ -459,7 +459,7 @@ ClientHandler *accept_connection(event_base *evbase, ...@@ -459,7 +459,7 @@ ClientHandler *accept_connection(event_base *evbase,
char service[NI_MAXSERV]; char service[NI_MAXSERV];
int rv; int rv;
rv = getnameinfo(addr, addrlen, host, sizeof(host), service, sizeof(service), rv = getnameinfo(addr, addrlen, host, sizeof(host), service, sizeof(service),
NI_NUMERICHOST); NI_NUMERICHOST | NI_NUMERICSERV);
if (rv != 0) { if (rv != 0) {
LOG(ERROR) << "getnameinfo() failed: " << gai_strerror(rv); LOG(ERROR) << "getnameinfo() failed: " << gai_strerror(rv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment