Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix active mode (fast-poll) management in CommissioningWindowManager. #23298

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/app/server/CommissioningWindowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE()

mPairingSession.Clear();

#if CHIP_DEVICE_CONFIG_ENABLE_SED
if (!mIsBLE && !mListeningForPASE)
{
DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(true);
}
#endif

ReturnErrorOnFailure(mServer->GetExchangeManager().RegisterUnsolicitedMessageHandlerForType(
Protocols::SecureChannel::MsgType::PBKDFParamRequest, &mPairingSession));
mListeningForPASE = true;
Expand Down Expand Up @@ -400,13 +407,6 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement()
DeviceLayer::ConfigurationMgr().NotifyOfAdvertisementStart();
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_SED
if (!mIsBLE && !IsCommissioningWindowOpen())
{
DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(true);
}
#endif

#if CONFIG_NETWORK_LAYER_BLE
if (mIsBLE)
{
Expand Down Expand Up @@ -446,17 +446,17 @@ CHIP_ERROR CommissioningWindowManager::StopAdvertisement(bool aShuttingDown)
{
RestoreDiscriminator();

mServer->GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::PBKDFParamRequest);
mListeningForPASE = false;
mPairingSession.Clear();

#if CHIP_DEVICE_CONFIG_ENABLE_SED
if (!mIsBLE && IsCommissioningWindowOpen())
if (!mIsBLE && mListeningForPASE)
{
DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(false);
}
#endif

mServer->GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::PBKDFParamRequest);
mListeningForPASE = false;
mPairingSession.Clear();

// If aShuttingDown, don't try to change our DNS-SD advertisements.
if (!aShuttingDown)
{
Expand Down