Skip to content

Commit

Permalink
removing unnecessary bookkeepting for TCP support
Browse files Browse the repository at this point in the history
  • Loading branch information
hnnajh committed Nov 10, 2023
1 parent 656a9be commit 281523a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/app/OperationalSessionSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void OperationalSessionSetup::Connect(Callback::Callback<OnDeviceConnected> * on
}
}

void OperationalSessionSetup::UpdateDeviceData(const Transport::PeerAddress & addr, const ReliableMessageProtocolConfig & config, bool supportsTcp)
void OperationalSessionSetup::UpdateDeviceData(const Transport::PeerAddress & addr, const ReliableMessageProtocolConfig & config)
{
if (mState == State::Uninitialized)
{
Expand Down Expand Up @@ -531,7 +531,7 @@ void OperationalSessionSetup::PerformAddressUpdate()

void OperationalSessionSetup::OnNodeAddressResolved(const PeerId & peerId, const ResolveResult & result)
{
UpdateDeviceData(result.address, result.mrpRemoteConfig, result.supportsTcp);
UpdateDeviceData(result.address, result.mrpRemoteConfig);
}

void OperationalSessionSetup::OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason)
Expand Down
2 changes: 1 addition & 1 deletion src/app/OperationalSessionSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class DLL_EXPORT OperationalSessionSetup : public SessionEstablishmentDelegate,
/**
* This function will set new IP address, port and MRP retransmission intervals of the device.
*/
void UpdateDeviceData(const Transport::PeerAddress & addr, const ReliableMessageProtocolConfig & config, bool supportsTcp = false);
void UpdateDeviceData(const Transport::PeerAddress & addr, const ReliableMessageProtocolConfig & config);

#if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES
/**
Expand Down
4 changes: 1 addition & 3 deletions src/controller/CommissioneeDeviceProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ void CommissioneeDeviceProxy::CloseSession()
}

CHIP_ERROR CommissioneeDeviceProxy::UpdateDeviceData(const Transport::PeerAddress & addr,
const ReliableMessageProtocolConfig & config,
bool supportsTcp)
const ReliableMessageProtocolConfig & config)
{
mDeviceAddress = addr;

Expand All @@ -87,7 +86,6 @@ CHIP_ERROR CommissioneeDeviceProxy::UpdateDeviceData(const Transport::PeerAddres

Transport::SecureSession * secureSession = mSecureSession.Get().Value()->AsSecureSession();
secureSession->SetPeerAddress(addr);
secureSession->SetSupportsTcp(supportsTcp);

return CHIP_NO_ERROR;
}
Expand Down
3 changes: 1 addition & 2 deletions src/controller/CommissioneeDeviceProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ class CommissioneeDeviceProxy : public DeviceProxy, public SessionDelegate
*
* @param[in] addr Address of the device to be set.
* @param[in] config MRP parameters
* @param[in] supportsTcp indicates whether the remote peer supports TCP
*
* @return CHIP_NO_ERROR if the data has been updated, an error code otherwise.
*/
CHIP_ERROR UpdateDeviceData(const Transport::PeerAddress & addr, const ReliableMessageProtocolConfig & config, bool supportsTcp = false);
CHIP_ERROR UpdateDeviceData(const Transport::PeerAddress & addr, const ReliableMessageProtocolConfig & config);

/**
* @brief
Expand Down

0 comments on commit 281523a

Please sign in to comment.