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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h

Issue 2849113002: bluetooth: Fix crash when a notification arrives during a write (Closed)
Patch Set: Fix comment typo Created 3 years, 8 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
index 384c2658f4462b3b0ff67fc66dfc30d479e1b00d..43781def3597e52d6e29736a0e7abd6c3791ad1a 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
@@ -99,6 +99,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicMac
// Returns BluetoothRemoteGattDescriptorMac from CBDescriptor.
BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptorMac(
CBDescriptor* cb_descriptor) const;
+ bool HasPendingRead() const {
+ return !read_characteristic_value_callbacks_.first.is_null();
+ };
+ bool HasPendingWrite() const {
+ return !write_characteristic_value_callbacks_.first.is_null();
+ };
// Is true if the characteristic has been discovered with all its descriptors.
bool is_discovery_complete_;
// gatt_service_ owns instances of this class.
@@ -111,8 +117,6 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicMac
BluetoothUUID uuid_;
// Characteristic value.
std::vector<uint8_t> value_;
- // True if a gatt read or write request is in progress.
- bool characteristic_value_read_or_write_in_progress_;
// ReadRemoteCharacteristic request callbacks.
std::pair<ValueCallback, ErrorCallback> read_characteristic_value_callbacks_;
// WriteRemoteCharacteristic request callbacks.
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698