winverbs: map WSA error codes to winverbs status values
[mirror/winof/.git] / core / winverbs / user / wv_ep.cpp
index 31a3dfe..28d2f7d 100644 (file)
@@ -192,7 +192,7 @@ BindAddress(SOCKADDR* pAddress)
 \r
        m_Socket = socket(pAddress->sa_family, SOCK_STREAM, IPPROTO_TCP);\r
        if (m_Socket == INVALID_SOCKET) {\r
-               return WSAGetLastError();\r
+               return WvConvertWSAStatus(WSAGetLastError());\r
        }\r
 \r
        hr = bind(m_Socket, pAddress, bytes);\r
@@ -216,7 +216,7 @@ BindAddress(SOCKADDR* pAddress)
        return WV_SUCCESS;\r
 \r
 get_err:\r
-       hr = WSAGetLastError();\r
+       hr = WvConvertWSAStatus(WSAGetLastError());\r
 err:\r
        closesocket(m_Socket);\r
        m_Socket = INVALID_SOCKET;\r