Skip to content

Commit 89b0f38

Browse files
restyled-commitsinterfer
authored andcommitted
Restyled by clang-format
1 parent 934beca commit 89b0f38

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/app/clusters/network-commissioning/NetworkCommissioningCluster.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
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>
@@ -50,8 +50,8 @@
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

5656
namespace chip {
5757
namespace app {
@@ -64,13 +64,17 @@ using namespace chip::app::Clusters::NetworkCommissioning;
6464

6565
namespace {
6666

67+
#if !CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
68+
6769
bool 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
7579
using 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

src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_AttachToThreadN
392392
// Reset the previously set callback since it will never be called in case incorrect dataset was supplied.
393393
mpConnectCallback = nullptr;
394394

395-
#if CONFIG_CHIP_TELINK_OPENTHREAD_NETWORK_SWITCH_PATH
396-
if (callback == nullptr && dataset.IsCommissioned() && current_dataset.IsCommissioned() &&
395+
#if defined(CONFIG_CHIP_TELINK_OPENTHREAD_NETWORK_SWITCH_PATH) && CONFIG_CHIP_TELINK_OPENTHREAD_NETWORK_SWITCH_PATH
396+
if (callback == nullptr && dataset.IsCommissioned() && current_dataset.IsCommissioned() &&
397397
!dataset.AsByteSpan().data_equal(current_dataset.AsByteSpan()) && Impl()->IsThreadEnabled())
398398
{
399399
ReturnErrorOnFailure(Impl()->SetThreadProvision(dataset.AsByteSpan()));

0 commit comments

Comments
 (0)