Skip to content

Commit

Permalink
Remove IP rendezvous flags, fix chip-tool. (project-chip#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 and mkardous-silabs committed Oct 15, 2021
1 parent 7234453 commit 3be513c
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 @@ -1944,9 +1944,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 3be513c

Please sign in to comment.