summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-06-06 06:56:03 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-06-06 06:56:03 +0000
commit700b6e5ff2919c43508417241d41a43fd428b99e (patch)
tree75a68c76fbbb3d63203d68596465bd8ff8a9d79e /glib
parent88fd181eac4fad985bfa54ca5f30bb6d149eaee5 (diff)
downloadglib-700b6e5ff2919c43508417241d41a43fd428b99e.tar.gz
If we are watching the same fd several times (for different conditions,
2000-06-06 Tor Lillqvist <tml@iki.fi> * 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.)
Diffstat (limited to 'glib')
-rw-r--r--glib/giowin32.c4
1 files changed, 2 insertions, 2 deletions
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;
}
}