From ea5e0da40ee8dac9665c098e252b5c762b061870 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 24 May 2012 16:22:47 +0300 Subject: [PATCH] AVRCP: Fix not setting audio device connected to player While connecting device should be set to match the AVCTP session and when disconnected reset it back to NULL. --- audio/avrcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/avrcp.c b/audio/avrcp.c index cb6906d7e..b09fab08d 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -1197,6 +1197,7 @@ static void state_changed(struct audio_device *dev, avctp_state_t old_state, switch (new_state) { case AVCTP_STATE_DISCONNECTED: player->session = NULL; + player->dev = NULL; player->registered_events = 0; if (player->handler) { @@ -1207,6 +1208,7 @@ static void state_changed(struct audio_device *dev, avctp_state_t old_state, break; case AVCTP_STATE_CONNECTING: player->session = avctp_connect(&dev->src, &dev->dst); + player->dev = dev; if (!player->handler) player->handler = avctp_register_pdu_handler( -- 2.47.3