diff --git a/ChangeLog b/ChangeLog index fd32701e5..fbe04c932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fd32701e5..fbe04c932 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2000-06-06 Tor Lillqvist + + * giowin32.c (g_io_channel_win32_pipe_readable): If we are + watching the same fd several times (for different conditions, with + different callbacks), check them all. Only call the callback for + G_IO_IN from here. (This bug popped up when a watch for + G_IO_ERR|G_IO_HUP was added to gimplib.) + 2000-05-30 Tor Lillqvist * gutils.c (g_locale_get_codeset): Implement on Win32. diff --git a/giowin32.c b/giowin32.c index d5e467e3d..88c5c1032 100644 --- a/giowin32.c +++ b/giowin32.c @@ -1026,10 +1026,10 @@ g_io_channel_win32_pipe_readable (gint fd, for (i = 0; i < n_watched_pipes; i++) if (watched_pipes[i].fd == fd) { - if (watched_pipes[i].channel->offset < offset) + if ((watched_pipes[i].watch->condition & G_IO_IN) + && watched_pipes[i].channel->offset < offset) (*watched_pipes[i].watch->callback) (watched_pipes[i].watch->channel, G_IO_IN, watched_pipes[i].user_data); - break; } } diff --git a/glib/giowin32.c b/glib/giowin32.c index d5e467e3d..88c5c1032 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -1026,10 +1026,10 @@ g_io_channel_win32_pipe_readable (gint fd, for (i = 0; i < n_watched_pipes; i++) if (watched_pipes[i].fd == fd) { - if (watched_pipes[i].channel->offset < offset) + if ((watched_pipes[i].watch->condition & G_IO_IN) + && watched_pipes[i].channel->offset < offset) (*watched_pipes[i].watch->callback) (watched_pipes[i].watch->channel, G_IO_IN, watched_pipes[i].user_data); - break; } }