revents may have been cleared by GMain before dispatch().

See bug #587898.
This commit is contained in:
Thomas Kristensen 2011-01-03 15:20:12 +02:00 committed by Tor Lillqvist
parent b583f802e3
commit 1e5f11875b

View File

@ -2468,6 +2468,10 @@ socket_source_dispatch (GSource *source,
GSocketSourceFunc func = (GSocketSourceFunc)callback;
GSocketSource *socket_source = (GSocketSource *)source;
#ifdef G_OS_WIN32
socket_source->pollfd.revents = update_condition (socket_source->socket);
#endif
return (*func) (socket_source->socket,
socket_source->pollfd.revents & socket_source->condition,
user_data);