summaryrefslogtreecommitdiffstats
path: root/sdpd/server.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-02-16 20:18:37 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-02-16 20:18:37 +0000
commit559a9a2ef363a2d9e81581f5846c59b0209c3575 (patch)
tree1348a65f7da583000bea0afed8a8bb839a704b6e /sdpd/server.c
parentbc6af96cbd6f8b073c9049e812b6f4a082c66a81 (diff)
Add missing flags to g_io_add_watch calls
Diffstat (limited to 'sdpd/server.c')
-rw-r--r--sdpd/server.c9
1 files changed, 6 insertions, 3 deletions
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;