Support old storage format 46/118246/1
authorSeungyoun Ju <sy39.ju@samsung.com>
Tue, 13 Sep 2016 13:00:59 +0000 (22:00 +0900)
committerSeungyoun Ju <sy39.ju@samsung.com>
Thu, 9 Mar 2017 09:22:45 +0000 (18:22 +0900)
[Model] COMMON
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] Old storage has BR/EDR/LE information in one RPA directory. So
 dbus object path is made as RPA. If we pass IDA when upper layer
 requests, it cannot be used because there is no matched dbus object
 path.
[Cause & Measure] Current storage policy separates BR/EDR and LE
 information to each addresses. So both dbus object paths are created. So
 in this case, IDA should be passed to upper layer. But in case of old
 version's paired device, RPA should be passed to upper layer.
[Checking Method] The device which has old storage (e.g. R730 VP1) makes
 pairing with iOS -> FOTA to new storage (e.g. VP2)

[Team] Basic connection
[Developer] Seungyoun Ju
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I3dd1a1afad93a38ee2b3bfd2bb6cc371cc066dc2

src/device.c

index 4e797c1..c87a0f6 100644 (file)
@@ -3767,9 +3767,12 @@ static DBusMessage *device_get_ida(DBusConnection *conn, DBusMessage *msg,
        if (!device->le)
                return btd_error_not_supported(msg);
 
-       if (device->rpa)
-               ba2str(&device->bdaddr, device_idaddr);
-       else
+       if (device->rpa) {
+               if (device->bredr)
+                       ba2str(device->rpa, device_idaddr);
+               else
+                       ba2str(&device->bdaddr, device_idaddr);
+       } else
                return btd_error_does_not_exist(msg);
 
        reply = dbus_message_new_method_return(msg);