2727#include < app/clusters/network-commissioning/WifiScanResponse.h>
2828#include < app/data-model/Nullable.h>
2929#include < app/reporting/reporting.h>
30- #include < app/server/Server.h>
3130#include < app/server-cluster/AttributeListBuilder.h>
3231#include < app/server-cluster/DefaultServerCluster.h>
32+ #include < app/server/Server.h>
3333#include < clusters/NetworkCommissioning/AttributeIds.h>
3434#include < clusters/NetworkCommissioning/CommandIds.h>
3535#include < clusters/NetworkCommissioning/Commands.h>
5050#include < platform/ConnectivityManager.h>
5151#include < platform/internal/DeviceNetworkInfo.h>
5252#include < protocols/interaction_model/StatusCode.h>
53- #include < transport/SecureSession.h>
5453#include < tracing/macros.h>
54+ #include < transport/SecureSession.h>
5555
5656namespace chip {
5757namespace app {
@@ -64,13 +64,17 @@ using namespace chip::app::Clusters::NetworkCommissioning;
6464
6565namespace {
6666
67+ #if !CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
68+
6769bool IsConnectNetworkRequestOverPASE (CommandHandler & handler)
6870{
6971 Messaging::ExchangeContext * exchangeCtx = handler.GetExchangeContext ();
7072 return exchangeCtx && exchangeCtx->HasSessionHandle () && exchangeCtx->GetSessionHandle ()->IsSecureSession () &&
7173 exchangeCtx->GetSessionHandle ()->AsSecureSession ()->GetSecureSessionType () == Transport::SecureSession::Type::kPASE ;
7274}
7375
76+ #endif // CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
77+
7478// Note: CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE can be 0, this disables debug text
7579using DebugTextStorage = std::array<char , CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE>;
7680
@@ -833,7 +837,6 @@ void NetworkCommissioningCluster::OnResult(Status commissioningError, CharSpan d
833837 // has already been sent and the BLE will have been stopped, however the other functionality
834838 // is still required
835839#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
836- auto commandHandle = commandHandleRef.Get ();
837840 if (commandHandle == nullptr )
838841 {
839842 // When the platform shut down, interaction model engine will invalidate all commandHandle to avoid dangling references.
@@ -874,7 +877,7 @@ void NetworkCommissioningCluster::OnResult(Status commissioningError, CharSpan d
874877
875878 if (shouldSendConnectNetworkResponse && commandHandle != nullptr )
876879 {
877- commandHandle->AddResponse (mAsyncCommandPath , response);
880+ commandHandle->AddResponse (mAsyncCommandPath , response);
878881 }
879882
880883#if !CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
0 commit comments