If the event fired, assign f->revents=f->events. We can't know whether the
authorTor Lillqvist <tml@novell.com>
Tue, 29 Mar 2005 08:00:53 +0000 (08:00 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Tue, 29 Mar 2005 08:00:53 +0000 (08:00 +0000)
2005-03-29  Tor Lillqvist  <tml@novell.com>

* glib/gmain.c (g_poll): If the event fired, assign
f->revents=f->events. We can't know whether the upper layer using
the event actually is readable, writeable or what, so say that all
the conditions hold. Remove the ResetEvent() call that has been
ifdeffed out anyway for a long time. Remove an "#ifdef 1" and
#endif pair of lines, that code is not optional.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-8
glib/gmain.c

index 1d14a6561927e41751798b69409dfe7b1397c37f..13be51d197d8bcad512471fd452841da204b332e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-29  Tor Lillqvist  <tml@novell.com>
+
+       * glib/gmain.c (g_poll): If the event fired, assign
+       f->revents=f->events. We can't know whether the upper layer using
+       the event actually is readable, writeable or what, so say that all
+       the conditions hold. Remove the ResetEvent() call that has been
+       ifdeffed out anyway for a long time. Remove an "#ifdef 1" and
+       #endif pair of lines, that code is not optional.
+
 2005-03-28  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/date-test.c: 
index 1d14a6561927e41751798b69409dfe7b1397c37f..13be51d197d8bcad512471fd452841da204b332e 100644 (file)
@@ -1,3 +1,12 @@
+2005-03-29  Tor Lillqvist  <tml@novell.com>
+
+       * glib/gmain.c (g_poll): If the event fired, assign
+       f->revents=f->events. We can't know whether the upper layer using
+       the event actually is readable, writeable or what, so say that all
+       the conditions hold. Remove the ResetEvent() call that has been
+       ifdeffed out anyway for a long time. Remove an "#ifdef 1" and
+       #endif pair of lines, that code is not optional.
+
 2005-03-28  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/date-test.c: 
index 1d14a6561927e41751798b69409dfe7b1397c37f..13be51d197d8bcad512471fd452841da204b332e 100644 (file)
@@ -1,3 +1,12 @@
+2005-03-29  Tor Lillqvist  <tml@novell.com>
+
+       * glib/gmain.c (g_poll): If the event fired, assign
+       f->revents=f->events. We can't know whether the upper layer using
+       the event actually is readable, writeable or what, so say that all
+       the conditions hold. Remove the ResetEvent() call that has been
+       ifdeffed out anyway for a long time. Remove an "#ifdef 1" and
+       #endif pair of lines, that code is not optional.
+
 2005-03-28  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/date-test.c: 
index 1d14a6561927e41751798b69409dfe7b1397c37f..13be51d197d8bcad512471fd452841da204b332e 100644 (file)
@@ -1,3 +1,12 @@
+2005-03-29  Tor Lillqvist  <tml@novell.com>
+
+       * glib/gmain.c (g_poll): If the event fired, assign
+       f->revents=f->events. We can't know whether the upper layer using
+       the event actually is readable, writeable or what, so say that all
+       the conditions hold. Remove the ResetEvent() call that has been
+       ifdeffed out anyway for a long time. Remove an "#ifdef 1" and
+       #endif pair of lines, that code is not optional.
+
 2005-03-28  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/date-test.c: 
index 20ee9ffaa3cdccac955654b4f1d42349251384fc..73d7f7c4cacc8a9502a15fe2d738afebb7e08582 100644 (file)
@@ -478,26 +478,17 @@ g_poll (GPollFD *fds,
                f->revents |= G_IO_IN;
          }
     }
-#if 1 /* TEST_WITHOUT_THIS */
   else if (ready >= WAIT_OBJECT_0 && ready < WAIT_OBJECT_0 + nhandles)
     for (f = fds; f < &fds[nfds]; ++f)
       {
-       if ((f->events & (G_IO_IN | G_IO_OUT))
-           && f->fd == (gint) handles[ready - WAIT_OBJECT_0])
+       if (f->fd == (gint) handles[ready - WAIT_OBJECT_0])
          {
-           if (f->events & G_IO_IN)
-             f->revents |= G_IO_IN;
-           else
-             f->revents |= G_IO_OUT;
+           f->revents = f->events;
 #ifdef G_MAIN_POLL_DEBUG
            g_print ("g_poll: got event %#x\n", f->fd);
-#endif
-#if 0
-           ResetEvent ((HANDLE) f->fd);
 #endif
          }
       }
-#endif
     
   return 1;
 }