From 11dc03dd41fd78c32422da8e0067a33bcf8c15e3 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 14 May 2020 15:09:58 -0400 Subject: [PATCH] Rename CHIPConnection to CHIPUdpExchange.h. Reasoning is that UDP is connectionless, so we use "exchange" to denote exchanging messages. Future CHIPConnection will actually handle connection protocols (tcp, ble). --- src/controller/CHIPDeviceController.cpp | 62 +++++++++---------- src/controller/CHIPDeviceController.h | 8 +-- ...CHIPConnection.cpp => CHIPUdpExchange.cpp} | 50 +++++++-------- .../{CHIPConnection.h => CHIPUdpExchange.h} | 20 +++--- src/lib/core/CoreLayer.am | 4 +- src/lib/core/tests/Makefile.am | 8 +-- ...Connection.cpp => TestCHIPUdpExchange.cpp} | 16 ++--- ...iver.cpp => TestCHIPUdpExchangeDriver.cpp} | 4 +- src/lib/core/tests/TestCore.h | 2 +- src/lib/support/TestUtils.cpp | 2 +- src/lib/support/tests/TestCHIPArgParser.cpp | 2 +- 11 files changed, 89 insertions(+), 89 deletions(-) rename src/lib/core/{CHIPConnection.cpp => CHIPUdpExchange.cpp} (80%) rename src/lib/core/{CHIPConnection.h => CHIPUdpExchange.h} (88%) rename src/lib/core/tests/{TestCHIPConnection.cpp => TestCHIPUdpExchange.cpp} (93%) rename src/lib/core/tests/{TestCHIPConnectionDriver.cpp => TestCHIPUdpExchangeDriver.cpp} (96%) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 8f89ad5bf72d21..dd9af29f199a06 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -50,15 +50,15 @@ using namespace chip::Encoding; ChipDeviceController::ChipDeviceController() { - mState = kState_NotInitialized; - AppState = NULL; - mConState = kConnectionState_NotConnected; - mDeviceCon = NULL; - mCurReqMsg = NULL; - mOnError = NULL; - mDeviceAddr = IPAddress::Any; - mDevicePort = CHIP_PORT; - mDeviceId = 0; + mState = kState_NotInitialized; + AppState = NULL; + mConState = kConnectionState_NotConnected; + mUdpExchange = NULL; + mCurReqMsg = NULL; + mOnError = NULL; + mDeviceAddr = IPAddress::Any; + mDevicePort = CHIP_PORT; + mDeviceId = 0; memset(&mOnComplete, 0, sizeof(mOnComplete)); } @@ -103,11 +103,11 @@ CHIP_ERROR ChipDeviceController::Shutdown() CHIP_ERROR err = CHIP_NO_ERROR; mState = kState_NotInitialized; - if (mDeviceCon != NULL) + if (mUdpExchange != NULL) { - mDeviceCon->Close(); - delete mDeviceCon; - mDeviceCon = NULL; + mUdpExchange->Close(); + delete mUdpExchange; + mUdpExchange = NULL; } mSystemLayer->Shutdown(); mInetLayer->Shutdown(); @@ -128,7 +128,7 @@ CHIP_ERROR ChipDeviceController::ConnectDevice(uint64_t deviceId, IPAddress devi { CHIP_ERROR err = CHIP_NO_ERROR; - if (mState != kState_Initialized || mDeviceCon != NULL || mConState != kConnectionState_NotConnected) + if (mState != kState_Initialized || mUdpExchange != NULL || mConState != kConnectionState_NotConnected) { return CHIP_ERROR_INCORRECT_STATE; } @@ -137,15 +137,15 @@ CHIP_ERROR ChipDeviceController::ConnectDevice(uint64_t deviceId, IPAddress devi mDeviceAddr = deviceAddr; mDevicePort = devicePort; mAppReqState = appReqState; - mDeviceCon = new ChipConnection(); + mUdpExchange = new ChipUdpExchange(); - mDeviceCon->Init(mInetLayer); - err = mDeviceCon->Connect(mDeviceId, mDeviceAddr, mDevicePort); + mUdpExchange->Init(mInetLayer); + err = mUdpExchange->Connect(mDeviceId, mDeviceAddr, mDevicePort); SuccessOrExit(err); - mDeviceCon->OnMessageReceived = OnReceiveMessage; - mDeviceCon->OnReceiveError = OnReceiveError; - mDeviceCon->AppState = this; + mUdpExchange->OnMessageReceived = OnReceiveMessage; + mUdpExchange->OnReceiveError = OnReceiveError; + mUdpExchange->AppState = this; mOnComplete.Response = onMessageReceived; mOnError = onError; @@ -153,11 +153,11 @@ CHIP_ERROR ChipDeviceController::ConnectDevice(uint64_t deviceId, IPAddress devi mConState = kConnectionState_Connected; exit: - if (err != CHIP_NO_ERROR && mDeviceCon != NULL) + if (err != CHIP_NO_ERROR && mUdpExchange != NULL) { - mDeviceCon->Close(); - delete mDeviceCon; - mDeviceCon = NULL; + mUdpExchange->Close(); + delete mUdpExchange; + mUdpExchange = NULL; } return err; } @@ -171,10 +171,10 @@ CHIP_ERROR ChipDeviceController::DisconnectDevice() return CHIP_ERROR_INCORRECT_STATE; } - err = mDeviceCon->Close(); - delete mDeviceCon; - mDeviceCon = NULL; - mConState = kConnectionState_NotConnected; + err = mUdpExchange->Close(); + delete mUdpExchange; + mUdpExchange = NULL; + mConState = kConnectionState_NotConnected; return err; }; @@ -185,7 +185,7 @@ CHIP_ERROR ChipDeviceController::SendMessage(void * appReqState, PacketBuffer * mAppReqState = appReqState; if (mConState == kConnectionState_Connected) { - err = mDeviceCon->SendMessage(buffer); + err = mUdpExchange->SendMessage(buffer); } return err; @@ -254,7 +254,7 @@ void ChipDeviceController::ClearRequestState() } } -void ChipDeviceController::OnReceiveMessage(ChipConnection * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo) +void ChipDeviceController::OnReceiveMessage(ChipUdpExchange * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo) { ChipDeviceController * mgr = (ChipDeviceController *) con->AppState; if (mgr->mConState == kConnectionState_Connected && mgr->mOnComplete.Response != NULL && pktInfo != NULL) @@ -263,7 +263,7 @@ void ChipDeviceController::OnReceiveMessage(ChipConnection * con, PacketBuffer * } } -void ChipDeviceController::OnReceiveError(ChipConnection * con, CHIP_ERROR err, const IPPacketInfo * pktInfo) +void ChipDeviceController::OnReceiveError(ChipUdpExchange * con, CHIP_ERROR err, const IPPacketInfo * pktInfo) { ChipDeviceController * mgr = (ChipDeviceController *) con->AppState; if (mgr->mConState == kConnectionState_Connected && mgr->mOnError != NULL && pktInfo != NULL) diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9aacf8cd8386b1..2e3adecdad3978 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include namespace chip { namespace DeviceController { @@ -116,7 +116,7 @@ class DLL_EXPORT ChipDeviceController System::Layer * mSystemLayer; Inet::InetLayer * mInetLayer; - ChipConnection * mDeviceCon; + ChipUdpExchange * mUdpExchange; ConnectionState mConState; void * mAppReqState; @@ -137,8 +137,8 @@ class DLL_EXPORT ChipDeviceController void ClearRequestState(); void ClearOpState(); - static void OnReceiveMessage(ChipConnection * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo); - static void OnReceiveError(ChipConnection * con, CHIP_ERROR err, const IPPacketInfo * pktInfo); + static void OnReceiveMessage(ChipUdpExchange * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo); + static void OnReceiveError(ChipUdpExchange * con, CHIP_ERROR err, const IPPacketInfo * pktInfo); }; } // namespace DeviceController diff --git a/src/lib/core/CHIPConnection.cpp b/src/lib/core/CHIPUdpExchange.cpp similarity index 80% rename from src/lib/core/CHIPConnection.cpp rename to src/lib/core/CHIPUdpExchange.cpp index 5c0febe301d865..016df2f240bf15 100644 --- a/src/lib/core/CHIPConnection.cpp +++ b/src/lib/core/CHIPUdpExchange.cpp @@ -24,7 +24,7 @@ * */ -#include +#include #include #include @@ -32,7 +32,7 @@ namespace chip { -ChipConnection::ChipConnection() : mState(kState_NotReady), mRefCount(1) +ChipUdpExchange::ChipUdpExchange() : mState(kState_NotReady), mRefCount(1) { mState = kState_NotReady; mRefCount = 1; @@ -45,7 +45,7 @@ ChipConnection::ChipConnection() : mState(kState_NotReady), mRefCount(1) mPeerPort = 0; } -void ChipConnection::Init(Inet::InetLayer * inetLayer) +void ChipUdpExchange::Init(Inet::InetLayer * inetLayer) { if (mState != kState_NotReady) { @@ -57,7 +57,7 @@ void ChipConnection::Init(Inet::InetLayer * inetLayer) } // namespace chip -CHIP_ERROR ChipConnection::Connect(uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort) +CHIP_ERROR ChipUdpExchange::Connect(uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -78,7 +78,7 @@ CHIP_ERROR ChipConnection::Connect(uint64_t peerNodeId, const IPAddress & peerAd return err; } -CHIP_ERROR ChipConnection::DoConnect() +CHIP_ERROR ChipUdpExchange::DoConnect() { CHIP_ERROR err = CHIP_NO_ERROR; @@ -119,7 +119,7 @@ CHIP_ERROR ChipConnection::DoConnect() return err; } -CHIP_ERROR ChipConnection::SendMessage(PacketBuffer * msgBuf) +CHIP_ERROR ChipUdpExchange::SendMessage(PacketBuffer * msgBuf) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -143,10 +143,10 @@ CHIP_ERROR ChipConnection::SendMessage(PacketBuffer * msgBuf) return err; } -void ChipConnection::HandleDataReceived(IPEndPointBasis * endPoint, chip::System::PacketBuffer * msg, const IPPacketInfo * pktInfo) +void ChipUdpExchange::HandleDataReceived(IPEndPointBasis * endPoint, chip::System::PacketBuffer * msg, const IPPacketInfo * pktInfo) { - UDPEndPoint * udpEndPoint = static_cast(endPoint); - ChipConnection * connection = (ChipConnection *) udpEndPoint->AppState; + UDPEndPoint * udpEndPoint = static_cast(endPoint); + ChipUdpExchange * connection = (ChipUdpExchange *) udpEndPoint->AppState; // TODO this where where messages should be decoded if (connection->StateAllowsReceive() && msg != NULL) @@ -155,25 +155,25 @@ void ChipConnection::HandleDataReceived(IPEndPointBasis * endPoint, chip::System } } -void ChipConnection::HandleReceiveError(IPEndPointBasis * endPoint, CHIP_ERROR err, const IPPacketInfo * pktInfo) +void ChipUdpExchange::HandleReceiveError(IPEndPointBasis * endPoint, CHIP_ERROR err, const IPPacketInfo * pktInfo) { - UDPEndPoint * udpEndPoint = static_cast(endPoint); - ChipConnection * connection = (ChipConnection *) udpEndPoint->AppState; + UDPEndPoint * udpEndPoint = static_cast(endPoint); + ChipUdpExchange * connection = (ChipUdpExchange *) udpEndPoint->AppState; if (connection->StateAllowsReceive()) { connection->OnReceiveError(connection, err, pktInfo); } } /** - * Performs a non-blocking graceful close of the UDP based ChipConnection, delivering any + * Performs a non-blocking graceful close of the UDP based ChipUdpExchange, delivering any * remaining outgoing data before resetting the connection. * * This method provides no strong guarantee that any outgoing message not acknowledged at the application * protocol level has been received by the remote peer. * - * Once Close() has been called, the ChipConnection object can no longer be used for further communication. + * Once Close() has been called, the ChipUdpExchange object can no longer be used for further communication. * - * Calling Close() decrements the reference count associated with the ChipConnection object, whether or not + * Calling Close() decrements the reference count associated with the ChipUdpExchange object, whether or not * the connection is open/active at the time the method is called. If this results in the reference count * reaching zero, the resources associated with the connection object are freed. When this happens, the * application must have no further interactions with the object. @@ -183,12 +183,12 @@ void ChipConnection::HandleReceiveError(IPEndPointBasis * endPoint, CHIP_ERROR e * @return #CHIP_NO_ERROR unconditionally. * */ -CHIP_ERROR ChipConnection::Close() +CHIP_ERROR ChipUdpExchange::Close() { // Perform a graceful close. DoClose(CHIP_NO_ERROR); - // Decrement the ref count that was added when the ChipConnection object + // Decrement the ref count that was added when the ChipUdpExchange object // was allocated. VerifyOrDie(mRefCount != 0); mRefCount--; @@ -196,7 +196,7 @@ CHIP_ERROR ChipConnection::Close() return CHIP_NO_ERROR; } -void ChipConnection::DoClose(CHIP_ERROR err) +void ChipUdpExchange::DoClose(CHIP_ERROR err) { if (mState != kState_Closed) { @@ -223,26 +223,26 @@ void ChipConnection::DoClose(CHIP_ERROR err) } /** - * Reserve a reference to the ChipConnection object. + * Reserve a reference to the ChipUdpExchange object. * - * The Retain() method increments the reference count associated with the ChipConnection object. For every + * The Retain() method increments the reference count associated with the ChipUdpExchange object. For every * call to Retain(), the application is responsible for making a corresponding call to either Release(), Close() * or Abort(). */ -void ChipConnection::Retain() +void ChipUdpExchange::Retain() { VerifyOrDie(mRefCount < UINT8_MAX); ++mRefCount; } /** - * Decrement the reference count on the ChipConnection object. + * Decrement the reference count on the ChipUdpExchange object. * - * The Release() method decrements the reference count associated with the ChipConnection object. If + * The Release() method decrements the reference count associated with the ChipUdpExchange object. If * this results in the reference count reaching zero, the connection is closed and the connection object * is freed. When this happens, the application must have no further interactions with the object. */ -void ChipConnection::Release() +void ChipUdpExchange::Release() { // If the only reference that will remain after this call is the one that was automatically added // when the connection started, close the connection. @@ -255,4 +255,4 @@ void ChipConnection::Release() mRefCount--; } -} // namespace chip \ No newline at end of file +} // namespace chip diff --git a/src/lib/core/CHIPConnection.h b/src/lib/core/CHIPUdpExchange.h similarity index 88% rename from src/lib/core/CHIPConnection.h rename to src/lib/core/CHIPUdpExchange.h index 74e2f7f49c73d8..10d8ffb45bf5c5 100644 --- a/src/lib/core/CHIPConnection.h +++ b/src/lib/core/CHIPUdpExchange.h @@ -24,8 +24,8 @@ * */ -#ifndef __CHIPCONNECTION_H__ -#define __CHIPCONNECTION_H__ +#ifndef __CHIPUDPEXCHANGE_H__ +#define __CHIPUDPEXCHANGE_H__ #include #include @@ -35,7 +35,7 @@ namespace chip { using namespace System; -class DLL_EXPORT ChipConnection +class DLL_EXPORT ChipUdpExchange { public: /** @@ -90,7 +90,7 @@ class DLL_EXPORT ChipConnection /** * @brief - * Close an existing connection. Once close is called, the ChipConnection object can no longer be used + * Close an existing connection. Once close is called, the ChipUdpExchange object can no longer be used * * @return CHIP_ERROR The close result */ @@ -103,31 +103,31 @@ class DLL_EXPORT ChipConnection * This function is the application callback that is invoked when a message is received over a * Chip connection. * - * @param[in] con A pointer to the ChipConnection object. + * @param[in] con A pointer to the ChipUdpExchange object. * * @param[in] msgBuf A pointer to the PacketBuffer object holding the message. * * @param[in] pktInfo A pointer to the IPPacketInfo object carrying sender details. * */ - typedef void (*MessageReceiveHandler)(ChipConnection * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo); + typedef void (*MessageReceiveHandler)(ChipUdpExchange * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo); MessageReceiveHandler OnMessageReceived; /** * This function is the application callback invoked upon encountering an error when receiving * a Chip message. * - * @param[in] con A pointer to the ChipConnection object. + * @param[in] con A pointer to the ChipUdpExchange object. * * @param[in] err The CHIP_ERROR encountered when receiving data over the connection. * * @param[in] pktInfo A pointer to the IPPacketInfo object carrying sender details. * */ - typedef void (*ReceiveErrorHandler)(ChipConnection * con, CHIP_ERROR err, const IPPacketInfo * pktInfo); + typedef void (*ReceiveErrorHandler)(ChipUdpExchange * con, CHIP_ERROR err, const IPPacketInfo * pktInfo); ReceiveErrorHandler OnReceiveError; - ChipConnection(); + ChipUdpExchange(); private: Inet::InetLayer * mInetLayer; @@ -149,4 +149,4 @@ class DLL_EXPORT ChipConnection } // namespace chip -#endif // __CHIPCONNECTION_H__ \ No newline at end of file +#endif // __CHIPUDPEXCHANGE_H__ diff --git a/src/lib/core/CoreLayer.am b/src/lib/core/CoreLayer.am index 4b2a4a5c6ec0b8..adc6376dc44092 100644 --- a/src/lib/core/CoreLayer.am +++ b/src/lib/core/CoreLayer.am @@ -32,7 +32,7 @@ CHIP_BUILD_CORE_LAYER_SOURCE_FILES = \ core/CHIPTLVWriter.cpp \ core/CHIPTLVUpdater.cpp \ core/CHIPKeyIds.cpp \ - core/CHIPConnection.cpp \ + core/CHIPUdpExchange.cpp \ $(NULL) CHIP_BUILD_CORE_LAYER_HEADER_FILES = \ @@ -51,5 +51,5 @@ CHIP_BUILD_CORE_LAYER_HEADER_FILES = \ core/CHIPTimeConfig.h \ core/CHIPTunnelConfig.h \ core/CHIPKeyIds.h \ - core/CHIPConnection.h \ + core/CHIPUdpExchange.h \ $(NULL) diff --git a/src/lib/core/tests/Makefile.am b/src/lib/core/tests/Makefile.am index 45a899b2b0ba8e..9f4dd465cbafc8 100644 --- a/src/lib/core/tests/Makefile.am +++ b/src/lib/core/tests/Makefile.am @@ -43,7 +43,7 @@ lib_LIBRARIES = \ libCoreTests_a_SOURCES = \ TestCHIPErrorStr.cpp \ TestCHIPTLV.cpp \ - TestCHIPConnection.cpp \ + TestCHIPUdpExchange.cpp \ $(NULL) libCoreTests_adir = $(includedir) @@ -87,7 +87,7 @@ COMMON_LDADD = \ check_PROGRAMS = \ TestCHIPErrorStr \ TestCHIPTLV \ - TestCHIPConnection \ + TestCHIPUdpExchange \ $(NULL) # Test applications and scripts that should be built and run when the @@ -111,8 +111,8 @@ TestCHIPErrorStr_LDADD = $(COMMON_LDADD) TestCHIPTLV_SOURCES = TestCHIPTLVDriver.cpp TestCHIPTLV_LDADD = $(COMMON_LDADD) -TestCHIPConnection_SOURCES = TestCHIPConnectionDriver.cpp -TestCHIPConnection_LDADD = $(COMMON_LDADD) +TestCHIPUdpExchange_SOURCES = TestCHIPUdpExchangeDriver.cpp +TestCHIPUdpExchange_LDADD = $(COMMON_LDADD) # # Foreign make dependencies # diff --git a/src/lib/core/tests/TestCHIPConnection.cpp b/src/lib/core/tests/TestCHIPUdpExchange.cpp similarity index 93% rename from src/lib/core/tests/TestCHIPConnection.cpp rename to src/lib/core/tests/TestCHIPUdpExchange.cpp index db9ffd209da72e..1afb736b8847af 100644 --- a/src/lib/core/tests/TestCHIPConnection.cpp +++ b/src/lib/core/tests/TestCHIPUdpExchange.cpp @@ -18,7 +18,7 @@ /** * @file - * This file implements unit tests for the CHIPConnection implementation. + * This file implements unit tests for the ChipUdpExchange implementation. */ #include "TestCore.h" @@ -28,7 +28,7 @@ #include #include -#include +#include #include @@ -48,7 +48,7 @@ struct TestContext sContext; static const char PAYLOAD[] = "Hello!"; -static void MessageReceiveHandler(ChipConnection * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo) +static void MessageReceiveHandler(ChipUdpExchange * con, PacketBuffer * msgBuf, const IPPacketInfo * pktInfo) { size_t data_len = msgBuf->DataLength(); @@ -56,7 +56,7 @@ static void MessageReceiveHandler(ChipConnection * con, PacketBuffer * msgBuf, c NL_TEST_ASSERT(reinterpret_cast(con->AppState), compare == 0); }; -static void ReceiveErrorHandler(ChipConnection * con, CHIP_ERROR err, const IPPacketInfo * pktInfo) +static void ReceiveErrorHandler(ChipUdpExchange * con, CHIP_ERROR err, const IPPacketInfo * pktInfo) { NL_TEST_ASSERT(reinterpret_cast(con->AppState), false); }; @@ -121,7 +121,7 @@ void CheckSimpleInitTest(nlTestSuite * inSuite, void * inContext) { TestContext & ctx = *reinterpret_cast(inContext); - ChipConnection conn; + ChipUdpExchange conn; conn.Init(&ctx.mInetLayer); CHIP_ERROR err = conn.Close(); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); @@ -135,7 +135,7 @@ void CheckSimpleConnectTest(nlTestSuite * inSuite, void * inContext) IPAddress::FromString("127.0.0.1", addr); CHIP_ERROR err = CHIP_NO_ERROR; - ChipConnection conn; + ChipUdpExchange conn; conn.Init(&ctx.mInetLayer); err = conn.Connect(0, addr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); @@ -160,7 +160,7 @@ void CheckMessageTest(nlTestSuite * inSuite, void * inContext) IPAddress::FromString("127.0.0.1", addr); CHIP_ERROR err = CHIP_NO_ERROR; - ChipConnection conn; + ChipUdpExchange conn; conn.Init(&ctx.mInetLayer); conn.AppState = inSuite; conn.OnMessageReceived = MessageReceiveHandler; @@ -251,7 +251,7 @@ static int Finalize(void * aContext) /** * Main */ -int TestCHIPConnection() +int TestChipUdpExchange() { // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/lib/core/tests/TestCHIPConnectionDriver.cpp b/src/lib/core/tests/TestCHIPUdpExchangeDriver.cpp similarity index 96% rename from src/lib/core/tests/TestCHIPConnectionDriver.cpp rename to src/lib/core/tests/TestCHIPUdpExchangeDriver.cpp index 09af2d833113c6..15e6300ef53573 100644 --- a/src/lib/core/tests/TestCHIPConnectionDriver.cpp +++ b/src/lib/core/tests/TestCHIPUdpExchangeDriver.cpp @@ -31,5 +31,5 @@ int main(void) // Generate machine-readable, comma-separated value (CSV) output. nlTestSetOutputStyle(OUTPUT_CSV); - return (TestCHIPConnection()); -} \ No newline at end of file + return (TestChipUdpExchange()); +} diff --git a/src/lib/core/tests/TestCore.h b/src/lib/core/tests/TestCore.h index 3426af01904cca..a57b9cf2cc947a 100644 --- a/src/lib/core/tests/TestCore.h +++ b/src/lib/core/tests/TestCore.h @@ -31,7 +31,7 @@ extern "C" { int TestCHIPErrorStr(void); int TestCHIPTLV(void); -int TestCHIPConnection(void); +int TestChipUdpExchange(void); #ifdef __cplusplus } diff --git a/src/lib/support/TestUtils.cpp b/src/lib/support/TestUtils.cpp index c54c1e3445c013..a3685dbe489552 100644 --- a/src/lib/support/TestUtils.cpp +++ b/src/lib/support/TestUtils.cpp @@ -53,4 +53,4 @@ int RunRegisteredUnitTests() return status; } -} // namespace chip \ No newline at end of file +} // namespace chip diff --git a/src/lib/support/tests/TestCHIPArgParser.cpp b/src/lib/support/tests/TestCHIPArgParser.cpp index 9f5acbd17c8730..efe6a741ef280a 100644 --- a/src/lib/support/tests/TestCHIPArgParser.cpp +++ b/src/lib/support/tests/TestCHIPArgParser.cpp @@ -728,4 +728,4 @@ int TestCHIPArgParser(void) printf("No tests were run\n"); return (EXIT_SUCCESS); } -#endif // CHIP_CONFIG_ENABLE_ARG_PARSER \ No newline at end of file +#endif // CHIP_CONFIG_ENABLE_ARG_PARSER