diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2006-11-18 20:07:37 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2006-11-18 20:07:37 +0000 | 
| commit | 9ce11bb84c54444560d2fc548c9caf4e9ad96aa4 (patch) | |
| tree | c2243c49fa585326125d0a5322b2427370706059 /sdpd/main.c | |
| parent | b8e61e63c24124da88e21e08668fa95fde346b4c (diff) | |
Check for errors on listening socket
Diffstat (limited to 'sdpd/main.c')
| -rw-r--r-- | sdpd/main.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/sdpd/main.c b/sdpd/main.c index 3a663218..0dde76fb 100644 --- a/sdpd/main.c +++ b/sdpd/main.c @@ -382,6 +382,11 @@ static gboolean io_accept_event(GIOChannel *chan, GIOCondition cond, gpointer da  	GIOChannel *io;  	int nsk; +	if (cond & (G_IO_HUP | G_IO_ERR)) { +		g_io_channel_unref(chan); +		return FALSE; +	} +  	if (data == &l2cap_sock) {  		struct sockaddr_l2 addr;  		socklen_t len = sizeof(addr); | 
