Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc

Issue 2728623004: Fix getting notified twice after subscribe to notifications and call readValue (Closed)
Patch Set: fixed device unittests Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc
index ce386daaa9a9019601770fc70ccdc2500d9a4f0c..5359b075d29813e90425e0c27d4ed872d0c4c0a8 100644
--- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc
@@ -45,6 +45,7 @@ BluetoothRemoteGattCharacteristicBlueZ::BluetoothRemoteGattCharacteristicBlueZ(
: BluetoothGattCharacteristicBlueZ(object_path),
has_notify_session_(false),
service_(service),
+ characteristic_value_read_in_progress_(false),
weak_ptr_factory_(this) {
VLOG(1) << "Creating remote GATT characteristic with identifier: "
<< GetIdentifier() << ", UUID: " << GetUUID().canonical_value();
@@ -184,6 +185,8 @@ void BluetoothRemoteGattCharacteristicBlueZ::ReadRemoteCharacteristic(
<< GetIdentifier() << ", UUID: " << GetUUID().canonical_value()
<< ".";
+ characteristic_value_read_in_progress_ = true;
ortuno 2017/03/03 05:28:37 If the read fails then this never goes back to fal
juncai 2017/03/04 01:33:59 Done.
+
bluez::BluezDBusManager::Get()
->GetBluetoothGattCharacteristicClient()
->ReadValue(object_path(), callback,

Powered by Google App Engine
This is Rietveld 408576698