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 3c8da08a08
commit dc14156d4f

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);