diff options
Diffstat (limited to 'components/pairing/bluetooth_host_pairing_controller.cc')
-rw-r--r-- | components/pairing/bluetooth_host_pairing_controller.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc index 072b494..1d35628 100644 --- a/components/pairing/bluetooth_host_pairing_controller.cc +++ b/components/pairing/bluetooth_host_pairing_controller.cc @@ -445,6 +445,11 @@ void BluetoothHostPairingController::KeysEntered( void BluetoothHostPairingController::ConfirmPasskey( device::BluetoothDevice* device, uint32 passkey) { + // If a new connection is occurring, reset the stage. This can occur if the + // pairing times out, or a new controller connects. + if (current_stage_ == STAGE_WAITING_FOR_CODE_CONFIRMATION) + ChangeStage(STAGE_WAITING_FOR_CONTROLLER); + confirmation_code_ = base::StringPrintf("%06d", passkey); device->ConfirmPairing(); ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); |