diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index 8ebf78a3fc545e..17f2e5945eb1bf 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -377,6 +377,9 @@ bool SetUpCodePairer::NodeMatchesCurrentFilter(const Dnssd::DiscoveredNodeData & case Dnssd::DiscoveryFilterType::kLongDiscriminator: discriminatorMatches = (nodeData.longDiscriminator == mCurrentFilter.code); break; + case Dnssd::DiscoveryFilterType::kNone: + ChipLogDetail(Controller, "Filter type none; all matches will fail"); + return false; default: ChipLogError(Controller, "Unknown filter type; all matches will fail"); return false; diff --git a/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp b/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp index 56b4932e9a8988..add4428c36a183 100644 --- a/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp +++ b/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp @@ -32,6 +32,9 @@ void ScriptPairingDeviceDiscoveryDelegate::OnDiscoveredDevice(const Dnssd::Commi nodeData.ipAddress[0].ToString(buf); ChipLogProgress(chipTool, "Discovered Device: %s:%u", buf, port); + // Stop active discovery. + mActiveDeviceCommissioner->StopCommissionableDiscovery(); + // Cancel discovery timer. chip::DeviceLayer::SystemLayer().CancelTimer(OnDiscoveredTimeout, this);