From: Pawel Wasowski
Date: Tue, 7 Mar 2017 10:14:14 +0000 (+0100)
Subject: [Bluetooth] Fix Bluetooth LE advertising initialzation
X-Git-Tag: submit/tizen_3.0/20170308.104234~4
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a1584fc0d8775682b9b6ddbbe9081c8a49801a3;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Bluetooth] Fix Bluetooth LE advertising initialzation
startAdvertise() could not obtain "uuids" field of BluetoothLEAdvertiseData and "uuid" of BluetoothLEServiceData.
[Verification] After a call to startAdvertise() in application's debug mode, the device becomes discoverable by other devices with its service and serviceData.
Change-Id: Iedf239e1e79df15b32f8c4de9df397635d789eb6
Signed-off-by: Pawel Wasowski
---
diff --git a/src/bluetooth/bluetooth_le_adapter.cc b/src/bluetooth/bluetooth_le_adapter.cc
index 7447289a..b63fc322 100755
--- a/src/bluetooth/bluetooth_le_adapter.cc
+++ b/src/bluetooth/bluetooth_le_adapter.cc
@@ -105,7 +105,7 @@ class BluetoothLEServiceData : public ParsedDataHolder {
static bool ParseUUID(const picojson::value& obj,
BluetoothLEServiceData* out) {
LoggerD("Entered");
- const auto& uuid = obj.get("serviceuuid");
+ const auto& uuid = obj.get("uuid");
if (uuid.is()) {
out->uuid_ = uuid.get();
} else {
@@ -261,7 +261,7 @@ class BluetoothLEAdvertiseData : public ParsedDataHolder {
static bool ParseServiceUUIDs(const picojson::value& obj,
BluetoothLEAdvertiseData* out) {
LoggerD("Entered");
- const auto& service_uuids = obj.get("serviceuuids");
+ const auto& service_uuids = obj.get("uuids");
if (service_uuids.is()) {
for (const auto& i : service_uuids.get()) {
if (i.is()) {