ws2_32: UDP sockets can write data even when unbound.

This commit is contained in:
Bruno Jesus 2015-06-18 11:03:10 -03:00 committed by Alexandre Julliard
parent 9d558c5c5f
commit 45677e173d
2 changed files with 2 additions and 3 deletions

View file

@ -4708,7 +4708,8 @@ static struct pollfd *fd_sets_to_poll( const WS_fd_set *readfds, const WS_fd_set
fds[j].fd = get_sock_fd( writefds->fd_array[i], FILE_WRITE_DATA, NULL );
if (fds[j].fd == -1) goto failed;
fds[j].revents = 0;
if (is_fd_bound(fds[j].fd, NULL, NULL) == 1)
if (is_fd_bound(fds[j].fd, NULL, NULL) == 1 ||
_get_fd_type(fds[j].fd) == SOCK_DGRAM)
{
fds[j].events = POLLOUT;
}

View file

@ -3877,9 +3877,7 @@ todo_wine
FD_ZERO_ALL();
FD_SET_ALL(fdWrite);
ret = select(0, &readfds, &writefds, &exceptfds, &select_timeout);
todo_wine
ok(ret == 1, "expected 1, got %d\n", ret);
todo_wine
ok(FD_ISSET(fdWrite, &writefds), "fdWrite socket is not in the set\n");
closesocket(fdWrite);
}