Skip to content

Commit

Permalink
Disable CRMP when PASE uses BLE (#6317)
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-apple authored and pull[bot] committed May 14, 2021
1 parent 4abe3fd commit 1030788
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/protocols/secure_channel/RendezvousSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ CHIP_ERROR SessionEstablishmentExchangeDispatch::OnMessageReceived(const Payload
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ class SessionEstablishmentExchangeDispatch : public Messaging::ExchangeMessageDi

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:
Expand Down

0 comments on commit 1030788

Please sign in to comment.