summaryrefslogtreecommitdiffstats
path: root/audio/avdtp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-09-21 13:11:17 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-09-21 13:11:17 +0000
commit7a3857fd8a6fb641134f356b72c50f860c852ef4 (patch)
tree9fb397d471c2457bdaafcec5299e9d405a09516e /audio/avdtp.c
parent5dc5142303d645d4abfbcf197f352ae7ca4a3f9a (diff)
Fix bogus error checking.
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r--audio/avdtp.c10
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",