[glib/glib-2-26] revents may have been cleared by GMain before dispatch().



commit 094e1d5e161894fe2795669e82398a3a4c1ebb1a
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 540e94b..3f0bb40 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -2466,6 +2466,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]