[Bluetooth] Wrong value was used in comparison.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Wed, 3 Jun 2015 14:11:59 +0000 (16:11 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Wed, 3 Jun 2015 14:11:59 +0000 (16:11 +0200)
Prevent CID: 390684

[Verification] Code compiles.

Change-Id: I0a84b63bd25d1c8f0ad6d6b2bc737be13474578c
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/bluetooth/bluetooth_gatt_service.cc

index 5f79f7425012d48ef61c6df0d3f04cd53451ddae..f22b67ecc3a2c2bd2187606e900035db897eaafe 100755 (executable)
@@ -338,7 +338,7 @@ void BluetoothGATTService::ReadValue(const picojson::value& args,
       char *value = nullptr;
       int length = 0;
       int ret = bt_gatt_get_value(handle, &value, &length);
-      if (BT_ERROR_NONE != result) {
+      if (BT_ERROR_NONE != ret) {
         plarform_res = util::GetBluetoothError(ret, "Error while getting value");
       } else {
         for (size_t i = 0 ; i < length; i++) {