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



commit 1e5f11875b65712195e4d0c8d160cdc9f9bbd99f
Author: Thomas Kristensen <thomas kristensen cisco com>
Date:   Mon Jan 3 15:20:12 2011 +0200

    revents may have been cleared by GMain before dispatch().
    
    See bug #587898.

 gio/gsocket.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsocket.c b/gio/gsocket.c
index b78a586..01792a7 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]