Bug 1163969 - Reject the stopLeScan request only if there's no ongoing LE Scan using the given handle. r=joliu

This commit is contained in:
Jamin Liu 2015-05-13 15:58:22 +08:00
parent 4e58e0c109
commit 2e4db95721

View File

@ -648,7 +648,7 @@ BluetoothAdapter::StopLeScan(BluetoothDiscoveryHandle& aDiscoveryHandle,
BT_ENSURE_TRUE_REJECT(bs, promise, NS_ERROR_NOT_AVAILABLE);
// Reject the request if there's no ongoing LE Scan using this handle.
BT_ENSURE_TRUE_REJECT(!mLeScanHandleArray.Contains(&aDiscoveryHandle),
BT_ENSURE_TRUE_REJECT(mLeScanHandleArray.Contains(&aDiscoveryHandle),
promise,
NS_ERROR_DOM_BLUETOOTH_DONE);