r12151: match the select mode of the standard events system and the liboop system,
authorStefan Metzmacher <metze@samba.org>
Fri, 9 Dec 2005 20:14:55 +0000 (20:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:15 +0000 (13:47 -0500)
and report errors as read events

metze

source/gtk/common/gtk_events.c

index 7f1230b13f402d748a96479e1ce3bcd2863ec2dd..9a0af5fdeb117a118844ca9afc0c32fe5eb1e51d 100644 (file)
@@ -145,7 +145,7 @@ static struct fd_event *gtk_event_add_fd(struct event_context *ev, TALLOC_CTX *m
        }
 
        if (fde->flags & EVENT_FD_READ)
-               condition |= G_IO_IN;
+               condition |= (G_IO_IN | G_IO_ERR | G_IO_HUP);
        if (fde->flags & EVENT_FD_WRITE)
                condition |= G_IO_OUT;
 
@@ -187,7 +187,7 @@ static void gtk_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
        if (fde->flags == flags) return;
 
        if (flags & EVENT_FD_READ)
-               condition |= G_IO_IN;
+               condition |= (G_IO_IN | G_IO_ERR | G_IO_HUP);
        if (flags & EVENT_FD_WRITE)
                condition |= G_IO_OUT;