Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-apple committed Jun 29, 2020
1 parent 07eb5c2 commit 7381326
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/lock-app/nrf5/main/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void SetupTransport(IPAddressType type, SecureSessionMgr * transport)
err = transport->Init(EXAMPLE_SERVER_NODEID, &DeviceLayer::InetLayer, UdpListenParameters().SetAddressType(type));
SuccessOrExit(err);

transport->AssignCallbackObject(&gCallbacks);
transport->SetDelegate(&gCallbacks);

exit:
if (err != CHIP_NO_ERROR)
Expand Down
2 changes: 1 addition & 1 deletion examples/wifi-echo/server/esp32/main/EchoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void setupTransport(IPAddressType type, SecureSessionMgr * transport, EchoServer

cb->mTransport = transport;

transport->AssignCallbackObject(cb);
transport->SetDelegate(cb);

exit:
if (err != CHIP_NO_ERROR)
Expand Down
4 changes: 2 additions & 2 deletions src/transport/SecureSessionMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DLL_EXPORT SecureSessionMgrCallback : public ReferenceCounted<SecureSessio
* Called when received message processing resulted in error
*
* @param error error code
* @param source network entity that sent the message
* @param source network entity that sent the message
*/
virtual void OnReceiveError(CHIP_ERROR error, const Inet::IPPacketInfo & source) {}

Expand Down Expand Up @@ -141,7 +141,7 @@ class DLL_EXPORT SecureSessionMgr : public ReferenceCounted<SecureSessionMgr>
* @details
* Release if there was an existing callback object
*/
void AssignCallbackObject(SecureSessionMgrCallback * cb)
void SetDelegate(SecureSessionMgrCallback * cb)
{
if (mCB != nullptr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/transport/tests/TestSecureSessionMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void CheckMessageTest(nlTestSuite * inSuite, void * inContext)
TestSessMgrCallback cb;
cb.mSuite = inSuite;

conn.AssignCallbackObject(&cb);
conn.SetDelegate(&cb);

cb.NewConnectionHandlerCallCount = 0;
err = conn.Connect(kDestinationNodeId, Transport::PeerAddress::UDP(addr));
Expand Down

0 comments on commit 7381326

Please sign in to comment.