server: Return Win32 socket types from get_socket_info.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-09-30 10:37:52 -05:00 committed by Alexandre Julliard
parent ac36b8ff01
commit b1f2b61be0
2 changed files with 10 additions and 10 deletions

View File

@ -2306,9 +2306,9 @@ static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, i
status = wine_server_call( req );
if (!status)
{
address_family = convert_af_u2w(reply->family);
socket_type = convert_socktype_u2w(reply->type);
protocol = convert_proto_u2w(reply->protocol);
address_family = reply->family;
socket_type = reply->type;
protocol = reply->protocol;
}
}
SERVER_END_REQ;

View File

@ -456,7 +456,7 @@ static void sock_poll_event( struct fd *fd, int event )
else
{
/* normal data flow */
if ( sock->type == SOCK_STREAM && ( event & POLLIN ) )
if (sock->type == WS_SOCK_STREAM && (event & POLLIN))
{
char dummy;
int nr;
@ -546,8 +546,8 @@ static int sock_get_poll_events( struct fd *fd )
else if (smask & FD_READ || (sock->state & FD_WINE_LISTENING && mask & FD_ACCEPT))
ev |= POLLIN | POLLPRI;
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication for stream sockets. */
else if ( sock->type == SOCK_STREAM && sock->state & FD_READ && mask & FD_CLOSE &&
!(sock->hmask & FD_READ) )
else if (sock->type == WS_SOCK_STREAM && (sock->state & FD_READ) && (mask & FD_CLOSE) &&
!(sock->hmask & FD_READ))
ev |= POLLIN;
if (async_queued( &sock->write_q ))
@ -813,9 +813,9 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u
sock->state = (type != SOCK_STREAM) ? (FD_READ|FD_WRITE) : 0;
sock->flags = flags;
sock->proto = unix_protocol;
sock->type = unix_type;
sock->family = unix_family;
sock->proto = protocol;
sock->type = type;
sock->family = family;
if (sock->fd)
{
@ -1540,7 +1540,7 @@ DECL_HANDLER(enable_socket_event)
sock->hmask &= ~req->mask;
sock->state |= req->sstate;
sock->state &= ~req->cstate;
if ( sock->type != SOCK_STREAM ) sock->state &= ~STREAM_FLAG_MASK;
if (sock->type != WS_SOCK_STREAM) sock->state &= ~STREAM_FLAG_MASK;
sock_reselect( sock );