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 5dc725c4a58..1d1490b2c72 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -816,7 +816,7 @@ static NTSTATUS sock_get_ntstatus( int err ) case EINVAL: return STATUS_INVALID_PARAMETER; case ENFILE: case EMFILE: return STATUS_TOO_MANY_OPENED_FILES; - case EWOULDBLOCK: return STATUS_CANT_WAIT; + 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; @@ -943,7 +943,7 @@ static NTSTATUS sock_error_to_ntstatus( DWORD err ) case WSAEFAULT: return STATUS_NO_MEMORY; case WSAEINVAL: return STATUS_INVALID_PARAMETER; case WSAEMFILE: return STATUS_TOO_MANY_OPENED_FILES; - case WSAEWOULDBLOCK: return STATUS_CANT_WAIT; + 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; @@ -995,7 +995,7 @@ static DWORD NtStatusToWSAError( DWORD status ) case STATUS_NO_MEMORY: return WSAEFAULT; case STATUS_ACCESS_DENIED: return WSAEACCES; case STATUS_TOO_MANY_OPENED_FILES: return WSAEMFILE; - case STATUS_CANT_WAIT: return WSAEWOULDBLOCK; + case STATUS_DEVICE_NOT_READY: return WSAEWOULDBLOCK; case STATUS_BUFFER_OVERFLOW: return WSAEMSGSIZE; case STATUS_NOT_SUPPORTED: return WSAEOPNOTSUPP; case STATUS_HOST_UNREACHABLE: return WSAEHOSTUNREACH;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- server/sock.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/server/sock.c b/server/sock.c index 39f02036da8..05fb737283b 100644 --- a/server/sock.c +++ b/server/sock.c @@ -462,7 +462,7 @@ static void fill_accept_output( struct accept_req *req ) return; }
- set_win32_error( sock_get_error( errno ) ); + set_error( sock_get_ntstatus( errno ) ); free( out_data ); return; } @@ -481,7 +481,7 @@ static void fill_accept_output( struct accept_req *req ) if (getsockname( fd, &unix_addr.addr, &unix_len ) < 0 || (win_len = sockaddr_from_unix( &unix_addr, win_addr, req->local_len - sizeof(int) )) < 0) { - set_win32_error( sock_get_error( errno ) ); + set_error( sock_get_ntstatus( errno ) ); free( out_data ); return; } @@ -494,7 +494,7 @@ static void fill_accept_output( struct accept_req *req ) if (getpeername( fd, &unix_addr.addr, &unix_len ) < 0 || (win_len = sockaddr_from_unix( &unix_addr, win_addr, remote_len - sizeof(int) )) < 0) { - set_win32_error( sock_get_error( errno ) ); + set_error( sock_get_ntstatus( errno ) ); free( out_data ); return; } @@ -1105,7 +1105,7 @@ static int accept_new_fd( struct sock *sock ) if (acceptfd != -1) fcntl( acceptfd, F_SETFL, O_NONBLOCK ); else - set_win32_error( sock_get_error( errno )); + set_error( sock_get_ntstatus( errno )); return acceptfd; }
@@ -1290,7 +1290,7 @@ static int sock_get_ntstatus( int err ) case EINVAL: return STATUS_INVALID_PARAMETER; case ENFILE: case EMFILE: return STATUS_TOO_MANY_OPENED_FILES; - case EWOULDBLOCK: return STATUS_CANT_WAIT; + 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; @@ -1387,7 +1387,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) struct accept_req *req;
if (sock->state & FD_WINE_NONBLOCKING) return 0; - if (get_error() != (0xc0010000 | WSAEWOULDBLOCK)) return 0; + if (get_error() != STATUS_DEVICE_NOT_READY) return 0;
if (!(req = alloc_accept_req( sock, NULL, async, NULL ))) return 0; list_add_tail( &sock->accept_list, &req->entry ); @@ -1435,7 +1435,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) if (acceptsock->accept_recv_req) { release_object( acceptsock ); - set_win32_error( WSAEINVAL ); + set_error( STATUS_INVALID_PARAMETER ); return 0; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- server/sock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/sock.c b/server/sock.c index 05fb737283b..f51bb19a064 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1459,7 +1459,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) case IOCTL_AFD_ADDRESS_LIST_CHANGE: if ((sock->state & FD_WINE_NONBLOCKING) && async_is_blocking( async )) { - set_win32_error( WSAEWOULDBLOCK ); + set_error( STATUS_DEVICE_NOT_READY ); return 0; } if (!sock_get_ifchange( sock )) return 0; @@ -1630,7 +1630,7 @@ static void ifchange_poll_event( struct fd *fd, int event ) unix_fd = socket( PF_NETLINK, SOCK_RAW, NETLINK_ROUTE ); if (unix_fd == -1) { - set_win32_error( sock_get_error( errno )); + set_error( sock_get_ntstatus( errno )); return NULL; } fcntl( unix_fd, F_SETFL, O_NONBLOCK ); /* make socket nonblocking */ @@ -1641,7 +1641,7 @@ static void ifchange_poll_event( struct fd *fd, int event ) if (bind( unix_fd, (struct sockaddr *)&addr, sizeof(addr) ) == -1) { close( unix_fd ); - set_win32_error( sock_get_error( errno )); + set_error( sock_get_ntstatus( errno )); return NULL; } if (!(ifchange = alloc_object( &ifchange_ops )))
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 1d1490b2c72..bfc3bea8ea3 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -829,7 +829,7 @@ static NTSTATUS sock_get_ntstatus( int err ) case EPROTOTYPE: return STATUS_NOT_SUPPORTED; case ENOPROTOOPT: return STATUS_INVALID_PARAMETER; case EOPNOTSUPP: return STATUS_NOT_SUPPORTED; - case EADDRINUSE: return STATUS_ADDRESS_ALREADY_ASSOCIATED; + case EADDRINUSE: return STATUS_SHARING_VIOLATION; case EADDRNOTAVAIL: return STATUS_INVALID_PARAMETER; case ECONNREFUSED: return STATUS_CONNECTION_REFUSED; case ESHUTDOWN: return STATUS_PIPE_DISCONNECTED; @@ -956,7 +956,7 @@ static NTSTATUS sock_error_to_ntstatus( DWORD err ) case WSAEPROTOTYPE: return STATUS_NOT_SUPPORTED; case WSAENOPROTOOPT: return STATUS_INVALID_PARAMETER; case WSAEOPNOTSUPP: return STATUS_NOT_SUPPORTED; - case WSAEADDRINUSE: return STATUS_ADDRESS_ALREADY_ASSOCIATED; + case WSAEADDRINUSE: return STATUS_SHARING_VIOLATION; case WSAEADDRNOTAVAIL: return STATUS_INVALID_PARAMETER; case WSAECONNREFUSED: return STATUS_CONNECTION_REFUSED; case WSAESHUTDOWN: return STATUS_PIPE_DISCONNECTED; @@ -989,7 +989,7 @@ static DWORD NtStatusToWSAError( DWORD status ) case STATUS_CONNECTION_RESET: return WSAECONNRESET; case STATUS_CONNECTION_ABORTED: return WSAECONNABORTED; case STATUS_CANCELLED: return WSA_OPERATION_ABORTED; - case STATUS_ADDRESS_ALREADY_ASSOCIATED: return WSAEADDRINUSE; + case STATUS_SHARING_VIOLATION: return WSAEADDRINUSE; case STATUS_IO_TIMEOUT: case STATUS_TIMEOUT: return WSAETIMEDOUT; case STATUS_NO_MEMORY: return WSAEFAULT;
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 f51bb19a064..49a75c33d2a 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1303,7 +1303,7 @@ static int sock_get_ntstatus( int err ) case EPROTOTYPE: return STATUS_NOT_SUPPORTED; case ENOPROTOOPT: return STATUS_INVALID_PARAMETER; case EOPNOTSUPP: return STATUS_NOT_SUPPORTED; - case EADDRINUSE: return STATUS_ADDRESS_ALREADY_ASSOCIATED; + case EADDRINUSE: return STATUS_SHARING_VIOLATION; case EADDRNOTAVAIL: return STATUS_INVALID_PARAMETER; case ECONNREFUSED: return STATUS_CONNECTION_REFUSED; case ESHUTDOWN: return STATUS_PIPE_DISCONNECTED;