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 <a.pietraszek@samsung.com>
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);
const auto& service_data_obj = obj.get(kServiceData);
if (service_data_obj.is<picojson::null>()) {
return true;
- } else if (!service_data_obj.is<picojson::value>()) {
+ } else if (!service_data_obj.is<picojson::object>()) {
return false;
}