Skip to content

Commit

Permalink
Remove IP rendezvous flags, fix chip-tool. (#9993)
Browse files Browse the repository at this point in the history
Fixes previous issue where we were getting too many device connected
callbacks and advancing the commissioning stage too quickly.
  • Loading branch information
cecille authored Sep 27, 2021
1 parent 12ce672 commit 8ae6ffe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1958,9 +1958,15 @@ void DeviceCommissioner::OnDeviceConnectedFn(void * context, Device * device)
if (commissioner->mDeviceBeingPaired < kNumMaxActiveDevices)
{
Device * deviceBeingPaired = &commissioner->mActiveDevices[commissioner->mDeviceBeingPaired];
if (device == deviceBeingPaired && commissioner->mCommissioningStage == CommissioningStage::kFindOperational)
if (device == deviceBeingPaired && commissioner->mIsIPRendezvous)
{
commissioner->AdvanceCommissioningStage(CHIP_NO_ERROR);
if (commissioner->mCommissioningStage == CommissioningStage::kFindOperational)
{
commissioner->AdvanceCommissioningStage(CHIP_NO_ERROR);
}
// For IP rendezvous, we don't want to call commissioning complete below because IP commissioning
// has more steps currently.
return;
}
}

Expand Down

0 comments on commit 8ae6ffe

Please sign in to comment.