diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 4521b712654843..6cfbca26184118 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -221,7 +221,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF , - Transport::WiFiPAFListenParameters(static_cast(DeviceLayer::ConnectivityMgr().GetWiFiPAF()->mWiFiPAFTransport)) + Transport::WiFiPAFListenParameters(static_cast( + DeviceLayer::ConnectivityMgr().GetWiFiPAF()->mWiFiPAFTransport)) #endif ); diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 057fbcacd79834..a81f0f78f36b6b 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -830,7 +830,7 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re ExitNow(CHIP_ERROR_INTERNAL); } mRendezvousParametersForDeviceDiscoveredOverWiFiPAF = params; - DeviceLayer::ConnectivityMgr().WiFiPAFConnect(params.GetSetupDiscriminator().value(), reinterpret_cast(this), + DeviceLayer::ConnectivityMgr().WiFiPAFConnect(params.GetSetupDiscriminator().value(), reinterpret_cast(this), OnWiFiPAFSubscribeComplete, OnWiFiPAFSubscribeError); ExitNow(CHIP_NO_ERROR); } @@ -1823,7 +1823,8 @@ void DeviceCommissioner::CloseBleConnection() #if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF void DeviceCommissioner::ConnectWiFiPAFTransportToSelf() { - Transport::WiFiPAFBase & transport = std::get>(mSystemState->TransportMgr()->GetTransport().GetTransports()); + Transport::WiFiPAFBase & transport = + std::get>(mSystemState->TransportMgr()->GetTransport().GetTransports()); if (!transport.IsWiFiPAFLayerTransportSetToSelf()) { transport.SetWiFiPAFLayerTransportToSelf(); diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index 92ef1a2fd72acf..0f84ff0b43a8f4 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -1521,14 +1521,14 @@ CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFCancelConnect() snprintf(args, sizeof(args), "subscribe_id=%d", mpresubscribe_id); wpa_fi_w1_wpa_supplicant1_interface_call_nancancel_subscribe_sync(mWpaSupplicant.iface, args, nullptr, &err.GetReceiver()); mOnPafSubscribeComplete = nullptr; - mOnPafSubscribeError = nullptr; + mOnPafSubscribeError = nullptr; return CHIP_NO_ERROR; } CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFCancelIncompleteConnect() { mOnPafSubscribeComplete = nullptr; - mOnPafSubscribeError = nullptr; + mOnPafSubscribeError = nullptr; return CHIP_NO_ERROR; } diff --git a/src/transport/raw/WiFiPAF.cpp b/src/transport/raw/WiFiPAF.cpp index 751114769c4892..7d6664a4472ee6 100644 --- a/src/transport/raw/WiFiPAF.cpp +++ b/src/transport/raw/WiFiPAF.cpp @@ -77,14 +77,17 @@ CHIP_ERROR WiFiPAFBase::SendMessage(const Transport::PeerAddress & address, Syst bool WiFiPAFBase::CanSendToPeer(const Transport::PeerAddress & address) { - if (mWiFiPAFLayer != nullptr) { - return (mWiFiPAFLayer->GetWiFiPAFState() != chip::WiFiPAF::State::kNotReady) && (address.GetTransportType() == Type::kWiFiPAF); - } else { + if (mWiFiPAFLayer != nullptr) + { + return (mWiFiPAFLayer->GetWiFiPAFState() != chip::WiFiPAF::State::kNotReady) && + (address.GetTransportType() == Type::kWiFiPAF); + } + else + { return false; } } - void WiFiPAFBase::OnWiFiPAFMessageReceived(System::PacketBufferHandle && buffer) { HandleMessageReceived(Transport::PeerAddress(Transport::Type::kWiFiPAF), std::move(buffer)); diff --git a/src/transport/raw/WiFiPAF.h b/src/transport/raw/WiFiPAF.h index c3d03119ab2141..fc81dcf7d9798a 100644 --- a/src/transport/raw/WiFiPAF.h +++ b/src/transport/raw/WiFiPAF.h @@ -24,12 +24,12 @@ #pragma once +#include "wifipaf/WiFiPAFLayer.h" #include #include #include #include #include -#include "wifipaf/WiFiPAFLayer.h" namespace chip { namespace Transport { @@ -66,8 +66,8 @@ class DLL_EXPORT WiFiPAFBase : public Base, public WiFiPAF::WiFiPAFLayerDelegate */ CHIP_ERROR SendAfterConnect(System::PacketBufferHandle && msg); - WiFiPAF::WiFiPAFLayer * mWiFiPAFLayer = nullptr; ///< Associated wifipaf layer - //WiFiPAF::WiFiPAFLayer::State mState = WiFiPAF::WiFiPAFLayer::State::kNotReady; + WiFiPAF::WiFiPAFLayer * mWiFiPAFLayer = nullptr; ///< Associated wifipaf layer + // WiFiPAF::WiFiPAFLayer::State mState = WiFiPAF::WiFiPAFLayer::State::kNotReady; System::PacketBufferHandle * mPendingPackets; size_t mPendingPacketsSize;