diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 15:09:29 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 15:09:29 +0200 |
commit | 8c238530c22a1e96f4ffa7a87141ace4dc6c9b48 (patch) | |
tree | 74646e6b2261ce7477c39a2a0ef5231b657252a1 /audio | |
parent | 5e9267c991331ef09ffcc28d306c78c57a2654a4 (diff) |
Fix stream channel closing
Diffstat (limited to 'audio')
-rw-r--r-- | audio/avdtp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c index 27a75d24..4792d8be 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -711,10 +711,8 @@ static void stream_free(struct avdtp_stream *stream) if (stream->timer) g_source_remove(stream->timer); - if (stream->io) { - g_io_channel_shutdown(stream->io, FALSE, NULL); + if (stream->io) g_io_channel_unref(stream->io); - } if (stream->io_id) g_source_remove(stream->io_id); @@ -750,7 +748,8 @@ static gboolean transport_cb(GIOChannel *chan, GIOCondition cond, sep->cfm->close(stream->session, sep, stream, NULL, sep->user_data); - stream->io = 0; + if (!(cond & G_IO_NVAL)) + g_io_channel_shutdown(stream->io, FALSE, NULL); avdtp_sep_set_state(stream->session, sep, AVDTP_STATE_IDLE); |