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:
parent
ac36b8ff01
commit
b1f2b61be0
|
@ -2306,9 +2306,9 @@ static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, i
|
||||||
status = wine_server_call( req );
|
status = wine_server_call( req );
|
||||||
if (!status)
|
if (!status)
|
||||||
{
|
{
|
||||||
address_family = convert_af_u2w(reply->family);
|
address_family = reply->family;
|
||||||
socket_type = convert_socktype_u2w(reply->type);
|
socket_type = reply->type;
|
||||||
protocol = convert_proto_u2w(reply->protocol);
|
protocol = reply->protocol;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
|
|
|
@ -456,7 +456,7 @@ static void sock_poll_event( struct fd *fd, int event )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* normal data flow */
|
/* normal data flow */
|
||||||
if ( sock->type == SOCK_STREAM && ( event & POLLIN ) )
|
if (sock->type == WS_SOCK_STREAM && (event & POLLIN))
|
||||||
{
|
{
|
||||||
char dummy;
|
char dummy;
|
||||||
int nr;
|
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))
|
else if (smask & FD_READ || (sock->state & FD_WINE_LISTENING && mask & FD_ACCEPT))
|
||||||
ev |= POLLIN | POLLPRI;
|
ev |= POLLIN | POLLPRI;
|
||||||
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication for stream sockets. */
|
/* 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 &&
|
else if (sock->type == WS_SOCK_STREAM && (sock->state & FD_READ) && (mask & FD_CLOSE) &&
|
||||||
!(sock->hmask & FD_READ) )
|
!(sock->hmask & FD_READ))
|
||||||
ev |= POLLIN;
|
ev |= POLLIN;
|
||||||
|
|
||||||
if (async_queued( &sock->write_q ))
|
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->state = (type != SOCK_STREAM) ? (FD_READ|FD_WRITE) : 0;
|
||||||
sock->flags = flags;
|
sock->flags = flags;
|
||||||
sock->proto = unix_protocol;
|
sock->proto = protocol;
|
||||||
sock->type = unix_type;
|
sock->type = type;
|
||||||
sock->family = unix_family;
|
sock->family = family;
|
||||||
|
|
||||||
if (sock->fd)
|
if (sock->fd)
|
||||||
{
|
{
|
||||||
|
@ -1540,7 +1540,7 @@ DECL_HANDLER(enable_socket_event)
|
||||||
sock->hmask &= ~req->mask;
|
sock->hmask &= ~req->mask;
|
||||||
sock->state |= req->sstate;
|
sock->state |= req->sstate;
|
||||||
sock->state &= ~req->cstate;
|
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 );
|
sock_reselect( sock );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue