[Bluetooth] Fix GATT characteristic value change listener 26/117526/1
authorPawel Wasowski <p.wasowski2@partner.samsung.com>
Mon, 6 Mar 2017 09:09:43 +0000 (10:09 +0100)
committerPawel Wasowski <p.wasowski2@partner.samsung.com>
Mon, 6 Mar 2017 09:09:43 +0000 (10:09 +0100)
Function registered with addValueChangeListener was not called.

Change-Id: Ida88778e21884510fece8c30b93da265b246db2b

src/bluetooth/bluetooth_gatt_service.cc

index fce5b5662817cf4f1234ee6add522ff3291cee94..1171038e49e3cf5e9ae1faca73235a947525cdd4 100755 (executable)
@@ -586,7 +586,7 @@ void BluetoothGATTService::OnCharacteristicValueChanged(
   }
 
   picojson::value result = picojson::value(picojson::object());
-  picojson::object result_obj = result.get<picojson::object>();
+  picojson::object& result_obj = result.get<picojson::object>();
 
   result_obj.insert(std::make_pair(kHandle, picojson::value((double)(long)characteristic)));