When WSAEnumNetworkEvents() signals FD_CONNECT that means that the
authorTor Lillqvist <tml@novell.com>
Fri, 6 Jul 2007 01:22:53 +0000 (01:22 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Fri, 6 Jul 2007 01:22:53 +0000 (01:22 +0000)
commit09d61979431729165cf9820c10e1b610b1d52920
tree745fd9f392c4f0489a9d8eb159fe07d92ff893ad
parent36dab3af816ff6e9131bbb35462a1711e3b52f65
When WSAEnumNetworkEvents() signals FD_CONNECT that means that the

2007-07-06  Tor Lillqvist  <tml@novell.com>

* glib/giowin32.c (g_io_win32_check): When WSAEnumNetworkEvents()
signals FD_CONNECT that means that the connection attempt
finished, either successfully or failed. Test explicitly whether
the connnection succeeded and set either G_IO_OUT if it did,
G_IO_ERR|G_IO_HUP if it failed.

Make sure we never set both G_IO_OUT and G_IO_HUP simultaneously
because in Unix poll(2) POLLOUT and POLLHUP are mutually
exclusive.

Ignore whether the caller wants to watch G_IO_HUP or not. Always
select for FD_CLOSE because Unix poll(2) also ignores whether
POLLHUP in set the requested events bitmask or not.

svn path=/trunk/; revision=5600
ChangeLog
glib/giowin32.c