Use src and dst addresses from btd_dev reference. --- profiles/audio/avctp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index a7daef3..e29527f 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) -- 1.7.9.5 -- 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