summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-08-11 14:19:51 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-08-11 14:19:51 +0000
commit1b9bcb5ed4fe1301b32db6db1be9200c7c66348a (patch)
tree02d56a19a4dbccb5ead35e9014f4560342ef638e
parent37b86c3b3bf4641c7f41c701f531ffbfc5ebe720 (diff)
Ensure that transport channels get disconnected before the signalling channel
-rw-r--r--audio/avdtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 2d71e272..bbb4314c 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -462,6 +462,9 @@ static void connection_lost(struct avdtp *session)
if (session->discov_cb)
finalize_discovery(session, -ECONNABORTED);
+ g_slist_foreach(session->streams, (GFunc) release_stream, session);
+ session->streams = NULL;
+
if (session->sock >= 0) {
close(session->sock);
session->sock = -1;
@@ -473,9 +476,6 @@ static void connection_lost(struct avdtp *session)
g_source_remove(session->io);
session->io = 0;
}
-
- g_slist_foreach(session->streams, (GFunc) release_stream, session);
- session->streams = NULL;
}
void avdtp_unref(struct avdtp *session)