Disable CRMP when PASE uses BLE (#6317)
diff --git a/src/protocols/secure_channel/RendezvousSession.h b/src/protocols/secure_channel/RendezvousSession.h
index 0204c6f..3598ef5 100644
--- a/src/protocols/secure_channel/RendezvousSession.h
+++ b/src/protocols/secure_channel/RendezvousSession.h
@@ -28,7 +28,6 @@
#include <protocols/secure_channel/NetworkProvisioning.h>
#include <protocols/secure_channel/PASESession.h>
#include <protocols/secure_channel/RendezvousParameters.h>
-#include <protocols/secure_channel/SessionEstablishmentExchangeDispatch.h>
#include <support/BufferWriter.h>
#include <transport/AdminPairingTable.h>
#include <transport/RendezvousSessionDelegate.h>
diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp
index 48ce10a..3eb32b6 100644
--- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp
+++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp
@@ -45,10 +45,8 @@
const Transport::PeerAddress & peerAddress,
ReliableMessageContext * reliableMessageContext)
{
- ReturnErrorOnFailure(ExchangeMessageDispatch::OnMessageReceived(payloadHeader, messageId, peerAddress, reliableMessageContext));
mPeerAddress = peerAddress;
-
- return CHIP_NO_ERROR;
+ return ExchangeMessageDispatch::OnMessageReceived(payloadHeader, messageId, peerAddress, reliableMessageContext);
}
bool SessionEstablishmentExchangeDispatch::MessagePermitted(uint16_t protocol, uint8_t type)
diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h
index d2bc0a8..3d78091 100644
--- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h
+++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h
@@ -59,9 +59,8 @@
bool IsTransportReliable() override
{
- // If we are not using BLE as the transport, the underlying transport is UDP based.
- // (return true only if BLE is being used as the transport)
- return (mTransportMgr == nullptr);
+ // If the underlying transport is not UDP.
+ return (mPeerAddress.GetTransportType() != Transport::Type::kUdp);
}
private: