OSDN Git Service

avctp: Fix missing UUID registration
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Fri, 10 May 2013 11:41:04 +0000 (13:41 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 10 May 2013 16:27:03 +0000 (19:27 +0300)
When there is an incoming connection to AVCTP PSM, there is no way to
know if the remote UUID corresponds to AVRCP_REMOTE_UUID or
AVRCP_TARGET_UUID. Therefore both UUIDs should be reported to the core.

Without this patch, a crash has been observed with the iPhone 5
immediately after pairing.

profiles/audio/avctp.c

index 6372709..db03456 100644 (file)
@@ -1370,6 +1370,8 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data)
 
        if (dev->control == NULL) {
                btd_device_add_uuid(dev->btd_dev, AVRCP_REMOTE_UUID);
+               btd_device_add_uuid(dev->btd_dev, AVRCP_TARGET_UUID);
+
                if (dev->control == NULL)
                        goto drop;
        }