diff --git a/src/afd.c b/src/afd.c index 79eb1a0..48b0c4e 100644 --- a/src/afd.c +++ b/src/afd.c @@ -116,7 +116,7 @@ static ssize_t _afd_get_protocol_info(SOCKET socket, SO_PROTOCOL_INFOW, (char*) protocol_info, &opt_len) != 0) - return_error(-1); + return_handle_error(-1, socket); id = -1; for (size_t i = 0; i < array_count(AFD_PROVIDER_GUID_LIST); i++) { diff --git a/src/error.c b/src/error.c index 3aec9bb..753a8e1 100644 --- a/src/error.c +++ b/src/error.c @@ -95,7 +95,7 @@ X(WSAENETUNREACH, ENETUNREACH) \ X(WSAENOBUFS, ENOMEM) \ X(WSAENOTCONN, ENOTCONN) \ - X(WSAENOTSOCK, EBADF) \ + X(WSAENOTSOCK, ENOTSOCK) \ X(WSAEOPNOTSUPP, EOPNOTSUPP) \ X(WSAESHUTDOWN, EPIPE) \ X(WSAETIMEDOUT, ETIMEDOUT) \