1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 13:19:04 +00:00

Use socket_strerror in Nsock callback traces.

Otherwise WinSock error numbers are not understood; you get "Unknown
error" instead of "Only one usage of each socket address
(protocol/network address/port) is normally permitted." for example.
This commit is contained in:
david
2012-09-06 20:11:04 +00:00
parent 3ae9ba63be
commit 66c296e27f

View File

@@ -1263,7 +1263,7 @@ void nsock_trace_handler_callback(mspool *ms, msevent *nse) {
nsi = nse->iod;
if (nse->status == NSE_STATUS_ERROR)
Snprintf(errstr, sizeof(errstr), "[%s (%d)] ", strerror(nse->errnum), nse->errnum);
Snprintf(errstr, sizeof(errstr), "[%s (%d)] ", socket_strerror(nse->errnum), nse->errnum);
else
errstr[0] = '\0';