output client port number in the log

main
xiaosuGW 3 years ago
parent 7009211b5b
commit b27fb75d46

@ -61,9 +61,9 @@ sandbox_receive_request(struct sandbox *sandbox)
== NULL)) { == NULL)) {
debuglog("Failed to log client_address: %s", strerror(errno)); debuglog("Failed to log client_address: %s", strerror(errno));
} }
uint16_t port = (((struct sockaddr_in6*)&sandbox->client_address)->sin6_port);
debuglog("Sandbox %lu: recv returned 0 before a complete request was received\n", sandbox->id); debuglog("Sandbox %lu: recv returned 0 before a complete request was received\n", sandbox->id);
debuglog("Socket: %d. Address: %s\n", fd, client_address_text); debuglog("Socket: %d. Address: %s, Port: %u\n", fd, client_address_text, port);
http_request_print(&sandbox->http_request); http_request_print(&sandbox->http_request);
goto err; goto err;
} }

Loading…
Cancel
Save