Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index bfc3bea8ea3..9eeb506f985 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -833,7 +833,7 @@ static NTSTATUS sock_get_ntstatus( int err ) case EADDRNOTAVAIL: return STATUS_INVALID_PARAMETER; case ECONNREFUSED: return STATUS_CONNECTION_REFUSED; case ESHUTDOWN: return STATUS_PIPE_DISCONNECTED; - case ENOTCONN: return STATUS_CONNECTION_DISCONNECTED; + case ENOTCONN: return STATUS_INVALID_CONNECTION; case ETIMEDOUT: return STATUS_IO_TIMEOUT; case ENETUNREACH: return STATUS_NETWORK_UNREACHABLE; case ENETDOWN: return STATUS_NETWORK_BUSY; @@ -960,7 +960,7 @@ static NTSTATUS sock_error_to_ntstatus( DWORD err ) case WSAEADDRNOTAVAIL: return STATUS_INVALID_PARAMETER; case WSAECONNREFUSED: return STATUS_CONNECTION_REFUSED; case WSAESHUTDOWN: return STATUS_PIPE_DISCONNECTED; - case WSAENOTCONN: return STATUS_CONNECTION_DISCONNECTED; + case WSAENOTCONN: return STATUS_INVALID_CONNECTION; case WSAETIMEDOUT: return STATUS_IO_TIMEOUT; case WSAENETUNREACH: return STATUS_NETWORK_UNREACHABLE; case WSAENETDOWN: return STATUS_NETWORK_BUSY; @@ -985,7 +985,7 @@ static DWORD NtStatusToWSAError( DWORD status ) case STATUS_NETWORK_BUSY: return WSAEALREADY; case STATUS_NETWORK_UNREACHABLE: return WSAENETUNREACH; case STATUS_CONNECTION_REFUSED: return WSAECONNREFUSED; - case STATUS_CONNECTION_DISCONNECTED: return WSAENOTCONN; + case STATUS_INVALID_CONNECTION: return WSAENOTCONN; case STATUS_CONNECTION_RESET: return WSAECONNRESET; case STATUS_CONNECTION_ABORTED: return WSAECONNABORTED; case STATUS_CANCELLED: return WSA_OPERATION_ABORTED;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- server/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/sock.c b/server/sock.c index 49a75c33d2a..cb2a1095496 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1307,7 +1307,7 @@ static int sock_get_ntstatus( int err ) case EADDRNOTAVAIL: return STATUS_INVALID_PARAMETER; case ECONNREFUSED: return STATUS_CONNECTION_REFUSED; case ESHUTDOWN: return STATUS_PIPE_DISCONNECTED; - case ENOTCONN: return STATUS_CONNECTION_DISCONNECTED; + case ENOTCONN: return STATUS_INVALID_CONNECTION; case ETIMEDOUT: return STATUS_IO_TIMEOUT; case ENETUNREACH: return STATUS_NETWORK_UNREACHABLE; case EHOSTUNREACH: return STATUS_HOST_UNREACHABLE;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 9eeb506f985..ff89ffb2d4b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -812,7 +812,7 @@ static NTSTATUS sock_get_ntstatus( int err ) case EBUSY: return STATUS_DEVICE_BUSY; case EPERM: case EACCES: return STATUS_ACCESS_DENIED; - case EFAULT: return STATUS_NO_MEMORY; + case EFAULT: return STATUS_ACCESS_VIOLATION; case EINVAL: return STATUS_INVALID_PARAMETER; case ENFILE: case EMFILE: return STATUS_TOO_MANY_OPENED_FILES; @@ -940,7 +940,7 @@ static NTSTATUS sock_error_to_ntstatus( DWORD err ) case 0: return STATUS_SUCCESS; case WSAEBADF: return STATUS_INVALID_HANDLE; case WSAEACCES: return STATUS_ACCESS_DENIED; - case WSAEFAULT: return STATUS_NO_MEMORY; + case WSAEFAULT: return STATUS_ACCESS_VIOLATION; case WSAEINVAL: return STATUS_INVALID_PARAMETER; case WSAEMFILE: return STATUS_TOO_MANY_OPENED_FILES; case WSAEWOULDBLOCK: return STATUS_DEVICE_NOT_READY; @@ -992,7 +992,7 @@ static DWORD NtStatusToWSAError( DWORD status ) case STATUS_SHARING_VIOLATION: return WSAEADDRINUSE; case STATUS_IO_TIMEOUT: case STATUS_TIMEOUT: return WSAETIMEDOUT; - case STATUS_NO_MEMORY: return WSAEFAULT; + case STATUS_ACCESS_VIOLATION: return WSAEFAULT; case STATUS_ACCESS_DENIED: return WSAEACCES; case STATUS_TOO_MANY_OPENED_FILES: return WSAEMFILE; case STATUS_DEVICE_NOT_READY: return WSAEWOULDBLOCK;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- server/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/sock.c b/server/sock.c index cb2a1095496..08399644a07 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1286,7 +1286,7 @@ static int sock_get_ntstatus( int err ) case EBUSY: return STATUS_DEVICE_BUSY; case EPERM: case EACCES: return STATUS_ACCESS_DENIED; - case EFAULT: return STATUS_NO_MEMORY; + case EFAULT: return STATUS_ACCESS_VIOLATION; case EINVAL: return STATUS_INVALID_PARAMETER; case ENFILE: case EMFILE: return STATUS_TOO_MANY_OPENED_FILES;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index ff89ffb2d4b..74e86e9d845 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -816,8 +816,8 @@ static NTSTATUS sock_get_ntstatus( int err ) case EINVAL: return STATUS_INVALID_PARAMETER; case ENFILE: case EMFILE: return STATUS_TOO_MANY_OPENED_FILES; + case EINPROGRESS: case EWOULDBLOCK: return STATUS_DEVICE_NOT_READY; - case EINPROGRESS: return STATUS_PENDING; case EALREADY: return STATUS_NETWORK_BUSY; case ENOTSOCK: return STATUS_OBJECT_TYPE_MISMATCH; case EDESTADDRREQ: return STATUS_INVALID_PARAMETER; @@ -858,8 +858,8 @@ UINT sock_get_error( int err ) case EFAULT: return WSAEFAULT; case EINVAL: return WSAEINVAL; case EMFILE: return WSAEMFILE; + case EINPROGRESS: case EWOULDBLOCK: return WSAEWOULDBLOCK; - case EINPROGRESS: return WSAEINPROGRESS; case EALREADY: return WSAEALREADY; case EBADF: case ENOTSOCK: return WSAENOTSOCK; @@ -943,8 +943,8 @@ static NTSTATUS sock_error_to_ntstatus( DWORD err ) case WSAEFAULT: return STATUS_ACCESS_VIOLATION; case WSAEINVAL: return STATUS_INVALID_PARAMETER; case WSAEMFILE: return STATUS_TOO_MANY_OPENED_FILES; + case WSAEINPROGRESS: case WSAEWOULDBLOCK: return STATUS_DEVICE_NOT_READY; - case WSAEINPROGRESS: return STATUS_PENDING; case WSAEALREADY: return STATUS_NETWORK_BUSY; case WSAENOTSOCK: return STATUS_OBJECT_TYPE_MISMATCH; case WSAEDESTADDRREQ: return STATUS_INVALID_PARAMETER; @@ -2958,7 +2958,7 @@ int WINAPI WS_connect(SOCKET s, const struct WS_sockaddr* name, int namelen) if (ret == 0) goto connect_success;
- if (ret == WSAEINPROGRESS) + if (ret == WSAEWOULDBLOCK) { /* tell wineserver that a connection is in progress */ _enable_event(SOCKET2HANDLE(s), FD_CONNECT|FD_READ|FD_WRITE, @@ -3047,7 +3047,7 @@ static BOOL WINAPI WS2_ConnectEx(SOCKET s, const struct WS_sockaddr* name, int n if (WSASend(s, &wsabuf, sendBuf ? 1 : 0, sent, 0, ov, NULL) != SOCKET_ERROR) goto connection_success; } - else if (ret == WSAEINPROGRESS) + else if (ret == WSAEWOULDBLOCK) { struct ws2_async *wsa; DWORD size;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- server/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/sock.c b/server/sock.c index 08399644a07..36fda31f9c1 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1221,8 +1221,8 @@ static unsigned int sock_get_error( int err ) case EFAULT: return WSAEFAULT; case EINVAL: return WSAEINVAL; case EMFILE: return WSAEMFILE; + case EINPROGRESS: case EWOULDBLOCK: return WSAEWOULDBLOCK; - case EINPROGRESS: return WSAEINPROGRESS; case EALREADY: return WSAEALREADY; case ENOTSOCK: return WSAENOTSOCK; case EDESTADDRREQ: return WSAEDESTADDRREQ; @@ -1290,8 +1290,8 @@ static int sock_get_ntstatus( int err ) case EINVAL: return STATUS_INVALID_PARAMETER; case ENFILE: case EMFILE: return STATUS_TOO_MANY_OPENED_FILES; + case EINPROGRESS: case EWOULDBLOCK: return STATUS_DEVICE_NOT_READY; - case EINPROGRESS: return STATUS_PENDING; case EALREADY: return STATUS_NETWORK_BUSY; case ENOTSOCK: return STATUS_OBJECT_TYPE_MISMATCH; case EDESTADDRREQ: return STATUS_INVALID_PARAMETER;