From: Luiz Augusto von Dentz <luiz.dentz-von@xxxxxxxxx> Request must be replied before removed. --- audio/transport.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/audio/transport.c b/audio/transport.c index 3442e5f..795b794 100644 --- a/audio/transport.c +++ b/audio/transport.c @@ -191,6 +191,10 @@ static void media_transport_remove(struct media_transport *transport, media_transport_release(transport, owner->accesstype); + /* Reply if owner has a pending request */ + if (owner->pending) + media_request_reply(owner->pending, transport->conn, EIO); + transport->owners = g_slist_remove(transport->owners, owner); if (owner->watch) @@ -313,6 +317,7 @@ static void a2dp_suspend_complete(struct avdtp *session, if (owner->pending) { owner->pending->id = 0; media_request_reply(owner->pending, transport->conn, 0); + media_owner_remove(owner, owner->pending); } a2dp_sep_unlock(sep, transport->session); @@ -413,6 +418,7 @@ static void headset_suspend_complete(struct audio_device *dev, void *user_data) if (owner->pending) { owner->pending->id = 0; media_request_reply(owner->pending, transport->conn, 0); + media_owner_remove(owner, owner->pending); } headset_unlock(dev, HEADSET_LOCK_READ | HEADSET_LOCK_WRITE); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html