GSocket: fix GIOCondition on timed-out socket operation
authorDan Winship <danw@gnome.org>
Sat, 27 Aug 2011 13:59:02 +0000 (09:59 -0400)
committerDan Winship <danw@gnome.org>
Sat, 27 Aug 2011 16:28:03 +0000 (12:28 -0400)
commitcef679d004b9fe89ae08519861e235818dd57b46
tree9fc4baa0ae0827f3b0c04f4031fa6d2381e1a45c
parent60f23ecbbc7d65eb5188875dc2c50a5f793a82a4
GSocket: fix GIOCondition on timed-out socket operation

The docs for g_socket_set_timeout() claimed that if an async operation
timed out, the GIOCondition passed to the source callback would be
G_IO_IN or G_IO_OUT (thus prompting the caller to call
g_socket_receive/send and get a G_IO_ERROR_TIMED_OUT), but in fact it
ended up being 0, and gio/tests/socket.c was erroneously testing for
that instead of the correct value. Fix this.
gio/gsocket.c
gio/tests/socket.c