Commit a3f94bde authored by Federico G. Schwindt's avatar Federico G. Schwindt

Don't call VTCP_hisname() on UDS connections

parent 1c8fed62
......@@ -242,8 +242,11 @@ server_thread(void *priv)
fd = accept(s->sock, addr, &l);
if (fd < 0)
vtc_fatal(vl, "Accept failed: %s", strerror(errno));
VTCP_hisname(fd, abuf, sizeof abuf, pbuf, sizeof pbuf);
vtc_log(vl, 3, "accepted fd %d %s %s", fd, abuf, pbuf);
if (*s->listen != '/') {
VTCP_hisname(fd, abuf, sizeof abuf, pbuf, sizeof pbuf);
vtc_log(vl, 3, "accepted fd %d %s %s", fd, abuf, pbuf);
} else
vtc_log(vl, 3, "accepted fd %d 0.0.0.0 0", fd);
fd = http_process(vl, s->spec, fd, &s->sock, s->listen);
vtc_log(vl, 3, "shutting fd %d", fd);
j = shutdown(fd, SHUT_WR);
......
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