diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-02-16 20:18:37 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-02-16 20:18:37 +0000 |
commit | 559a9a2ef363a2d9e81581f5846c59b0209c3575 (patch) | |
tree | 1348a65f7da583000bea0afed8a8bb839a704b6e | |
parent | bc6af96cbd6f8b073c9049e812b6f4a082c66a81 (diff) |
Add missing flags to g_io_add_watch calls
-rw-r--r-- | common/notify-inotify.c | 2 | ||||
-rw-r--r-- | sdpd/server.c | 9 | ||||
-rw-r--r-- | transfer/process.c | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/common/notify-inotify.c b/common/notify-inotify.c index 5672a4ed..281d4179 100644 --- a/common/notify-inotify.c +++ b/common/notify-inotify.c @@ -102,7 +102,7 @@ void notify_init(void) return; } - g_io_add_watch(io, G_IO_IN, io_event, NULL); + g_io_add_watch(io, G_IO_IN | G_IO_ERR | G_IO_HUP, io_event, NULL); } void notify_close(void) diff --git a/sdpd/server.c b/sdpd/server.c index 3f29bbef..8f13a051 100644 --- a/sdpd/server.c +++ b/sdpd/server.c @@ -207,7 +207,8 @@ static gboolean io_accept_event(GIOChannel *chan, GIOCondition cond, gpointer da io = g_io_channel_unix_new(nsk); g_io_channel_set_close_on_unref(io, TRUE); - g_io_add_watch(io, G_IO_IN, io_session_event, data); + g_io_add_watch(io, G_IO_IN | G_IO_ERR | G_IO_HUP, io_session_event, + data); g_io_channel_unref(io); @@ -230,13 +231,15 @@ int start_sdp_server(uint16_t mtu, uint32_t flags) l2cap_io = g_io_channel_unix_new(l2cap_sock); g_io_channel_set_close_on_unref(l2cap_io, TRUE); - g_io_add_watch(l2cap_io, G_IO_IN, io_accept_event, &l2cap_sock); + g_io_add_watch(l2cap_io, G_IO_IN | G_IO_ERR | G_IO_HUP, + io_accept_event, &l2cap_sock); if (compat && unix_sock > fileno(stderr)) { unix_io = g_io_channel_unix_new(unix_sock); g_io_channel_set_close_on_unref(unix_io, TRUE); - g_io_add_watch(unix_io, G_IO_IN, io_accept_event, &unix_sock); + g_io_add_watch(unix_io, G_IO_IN | G_IO_ERR | G_IO_HUP, + io_accept_event, &unix_sock); } return 0; diff --git a/transfer/process.c b/transfer/process.c index 39145f42..15bac918 100644 --- a/transfer/process.c +++ b/transfer/process.c @@ -74,7 +74,8 @@ int create_reader(uid_t uid, const char *pathname, io = g_io_channel_unix_new(pfd[0]); g_io_channel_set_close_on_unref(io, TRUE); - g_io_add_watch(io, G_IO_IN, func, user_data); + g_io_add_watch(io, G_IO_IN | G_IO_ERR | G_IO_HUP, func, + user_data); g_io_channel_unref(io); |