diff options
Diffstat (limited to 'sdpd/server.c')
-rw-r--r-- | sdpd/server.c | 9 |
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; |