DescriptionBluetooth: macOS: DidModifyServices can happens while scanning
This patch is to fix this scenario:
* Device: DidModifyServices notification
- Chrome: Scan for primary services
* Device: DidDiscoverServices
- Chrome: Scan for characteristics
* Device: DidModifyServices notification
- Chrome: Scan for primary services
* Device: DidDiscoverCharacteristics
* Device: DidDiscoverServices
- Chrome: Scan for characteristics
* Device: DidDiscoverCharacteristics
We need to wait until all the pending characteristic discoveries are done until we can start scanning
for descriptors. We need to make sure descriptors are not ready if DidModifyServices notification
is received while scanning for descriptors.
Adding discovery_pending_count_ in BluetoothRemoteGattServiceMac and BluetoothRemoteGattCharacteristicMac.
|is_discovery_complete_| can be set to true when discovery_pending_count_ is equal to 0.
BUG=690204
Review-Url: https://codereview.chromium.org/2638653002
Cr-Commit-Position: refs/heads/master@{#469457}
Committed: https://chromium.googlesource.com/chromium/src/+/74fe98e203e687c3c96f25128fc55e94981465a7
Patch Set 1 #Patch Set 2 : Counter version #Patch Set 3 : Merge from top of tree #Patch Set 4 : Adding unit tests #Patch Set 5 : Removing useless modification #
Total comments: 4
Patch Set 6 #Patch Set 7 : More unit tests #
Total comments: 8
Patch Set 8 : Adding comments and Mac suffix #
Total comments: 5
Patch Set 9 : First and Mac suffix #Patch Set 10 : Merge #Messages
Total messages: 58 (30 generated)
|