diff options
| -rw-r--r-- | audio/avdtp.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c index 2f12544a..7907763a 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -1510,11 +1510,6 @@ static gboolean l2cap_connect_cb(GIOChannel *chan, GIOCondition cond,  	sk = g_io_channel_unix_get_fd(chan); -	if (cond & (G_IO_ERR | G_IO_HUP)) { -		err = EIO; -		goto failed; -	} -  	len = sizeof(ret);  	if (getsockopt(sk, SOL_SOCKET, SO_ERROR, &ret, &len) < 0) {  		err = errno; @@ -1528,6 +1523,11 @@ static gboolean l2cap_connect_cb(GIOChannel *chan, GIOCondition cond,  		goto failed;  	} +	if (cond & G_IO_HUP) { +		err = EIO; +		goto failed; +	} +  	ba2str(&session->dst, address);  	debug("AVDTP: connected %s channel to %s",  			session->pending_open ? "transport" : "signaling",  | 
