summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/avdtp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 99a929f4..b90c57b8 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -471,6 +471,9 @@ static void stream_free(struct avdtp_stream *stream)
if (stream->timer)
g_source_remove(stream->timer);
+ if (stream->io)
+ g_source_remove(stream->io);
+
g_slist_foreach(stream->callbacks, (GFunc) g_free, NULL);
g_slist_free(stream->callbacks);
@@ -1240,6 +1243,8 @@ static gboolean transport_cb(GIOChannel *chan, GIOCondition cond,
sep->cfm->close(stream->session, sep, stream, NULL,
sep->user_data);
+ stream->io = 0;
+
avdtp_sep_set_state(stream->session, sep, AVDTP_STATE_IDLE);
return FALSE;