Diff between 0e4651f50626dd84584744741a3ad95daec4103f and 8eff0b1d5ac8caed6af3601a10d4f434729fde75

Changed Files

File Additions Deletions Status
profiles/audio/avctp.c +7 -1 modified

Full Patch

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 565efdb..e7dba37 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -1055,6 +1055,9 @@ static struct avctp *avctp_get_internal(const bdaddr_t *src,
 static void avctp_control_confirm(struct avctp *session, GIOChannel *chan,
 						struct audio_device *dev)
 {
+	const bdaddr_t *src;
+	const bdaddr_t *dst;
+
 	if (session->control != NULL) {
 		error("Control: Refusing unexpected connect");
 		g_io_channel_shutdown(chan, TRUE, NULL);
@@ -1064,7 +1067,10 @@ static void avctp_control_confirm(struct avctp *session, GIOChannel *chan,
 	avctp_set_state(session, AVCTP_STATE_CONNECTING);
 	session->control = avctp_channel_create(session, chan);
 
-	session->auth_id = btd_request_authorization(&dev->src, &dev->dst,
+	src = adapter_get_address(device_get_adapter(dev->btd_dev));
+	dst = device_get_address(dev->btd_dev);
+
+	session->auth_id = btd_request_authorization(src, dst,
 							AVRCP_TARGET_UUID,
 							auth_cb, session);
 	if (session->auth_id == 0)