Skip to content

Commit

Permalink
Fix resolve on BLE from ip network commissioning. (#7213)
Browse files Browse the repository at this point in the history
IP network provisioning was incorrectly early-returning from the
resolve callback and not sending data through to the python stack
for BLE.
  • Loading branch information
cecille authored and pull[bot] committed Aug 16, 2021
1 parent 2483934 commit 4314432
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1527,15 +1527,13 @@ void BasicFailure(void * context, uint8_t status)
void DeviceCommissioner::OnNodeIdResolved(const chip::Mdns::ResolvedNodeData & nodeData)
{
Device * device = nullptr;
if (mDeviceBeingPaired >= kNumMaxActiveDevices)
{
return;
}

device = &mActiveDevices[mDeviceBeingPaired];
if (device->GetDeviceId() == nodeData.mPeerId.GetNodeId() && mCommissioningStage == CommissioningStage::kFindOperational)
if (mDeviceBeingPaired < kNumMaxActiveDevices)
{
AdvanceCommissioningStage(CHIP_NO_ERROR);
device = &mActiveDevices[mDeviceBeingPaired];
if (device->GetDeviceId() == nodeData.mPeerId.GetNodeId() && mCommissioningStage == CommissioningStage::kFindOperational)
{
AdvanceCommissioningStage(CHIP_NO_ERROR);
}
}
DeviceController::OnNodeIdResolved(nodeData);
}
Expand Down

0 comments on commit 4314432

Please sign in to comment.