From: Arkadiusz Pietraszek Date: Wed, 12 Aug 2020 09:13:42 +0000 (+0200) Subject: [Bluetooth][fix] Small fix of crash in ParseServiceData X-Git-Tag: submit/tizen/20200831.125703~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbb14ed66dc80845a1b68aced194914dbae82949;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Bluetooth][fix] Small fix of crash in ParseServiceData There was a small mistake that caused crash when advertising with BLE adapter and using service data. [Verification] Code compiles and executes without crash or errors. Change-Id: I4254e800ee7fda21e6eb71c7f7f03d6b4a399beb Signed-off-by: Arkadiusz Pietraszek --- diff --git a/src/bluetooth/bluetooth_le_adapter.cc b/src/bluetooth/bluetooth_le_adapter.cc index 2a0fcd67..caad799e 100644 --- a/src/bluetooth/bluetooth_le_adapter.cc +++ b/src/bluetooth/bluetooth_le_adapter.cc @@ -119,7 +119,7 @@ class BluetoothLEServiceData : public ParsedDataHolder { private: BluetoothLEServiceData(UUID&& uuid, const std::string& data_str) : uuid_{std::move(uuid)} { - ScopeLogger("UUID: %s, data_str: %s", uuid.uuid_128_bit.c_str(), data_str.c_str()); + ScopeLogger("UUID: %s, data_str: %s", uuid_.uuid_128_bit.c_str(), data_str.c_str()); data_.Parse(data_str); @@ -325,7 +325,7 @@ class BluetoothLEAdvertiseData : public ParsedDataHolder { const auto& service_data_obj = obj.get(kServiceData); if (service_data_obj.is()) { return true; - } else if (!service_data_obj.is()) { + } else if (!service_data_obj.is()) { return false; }