1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

http: access_log: fix nwsi check

h2 logging often lacked the IP as it checked the af on the sa46_peer of the
child stream when it meant to check the nwsi one.
This commit is contained in:
Andy Green 2022-01-15 08:10:01 +00:00
parent 10a34fc43b
commit a352b9bf20

View file

@ -96,7 +96,7 @@ lws_prepare_access_log_info(struct lws *wsi, char *uri_ptr, int uri_len, int met
nwsi = lws_get_network_wsi(wsi);
if (wsi->sa46_peer.sa4.sin_family)
if (nwsi->sa46_peer.sa4.sin_family)
lws_sa46_write_numeric_address(&nwsi->sa46_peer, ta, sizeof(ta));
else
strncpy(ta, "unknown", sizeof(ta));