diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2007-04-04 07:30:14 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2007-04-04 07:30:14 +0000 | 
| commit | a36be2a103e95b04d5b348c83b41dc8c06439990 (patch) | |
| tree | c81c054292e610b93af27a4c416fd4e5f709b5f0 /sdpd/server.c | |
| parent | f89882a84a048cd676798e4a047a73fb202e246d (diff) | |
Fix missing G_IO_NVAL handling
Diffstat (limited to 'sdpd/server.c')
| -rw-r--r-- | sdpd/server.c | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/sdpd/server.c b/sdpd/server.c index 8f13a051..2abcc6bc 100644 --- a/sdpd/server.c +++ b/sdpd/server.c @@ -149,7 +149,7 @@ static gboolean io_session_event(GIOChannel *chan, GIOCondition cond, gpointer d  	uint8_t *buf;  	int sk, len, size; -	if (cond & (G_IO_HUP | G_IO_ERR)) +	if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL))  		return FALSE;  	sk = g_io_channel_unix_get_fd(chan); @@ -181,7 +181,7 @@ static gboolean io_accept_event(GIOChannel *chan, GIOCondition cond, gpointer da  	GIOChannel *io;  	int nsk; -	if (cond & (G_IO_HUP | G_IO_ERR)) { +	if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) {  		g_io_channel_unref(chan);  		return FALSE;  	} @@ -207,8 +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 | G_IO_ERR | G_IO_HUP, io_session_event, -			data); +	g_io_add_watch(io, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, +					io_session_event, data);  	g_io_channel_unref(io); @@ -231,15 +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 | G_IO_ERR | G_IO_HUP, -			io_accept_event, &l2cap_sock); +	g_io_add_watch(l2cap_io, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, +					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 | G_IO_ERR | G_IO_HUP, -				io_accept_event, &unix_sock); +		g_io_add_watch(unix_io, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, +					io_accept_event, &unix_sock);  	}  	return 0; | 
