From 071c0f7cd385a42541e6c04ea723301ff2459de9 Mon Sep 17 00:00:00 2001 From: yunhanw Date: Thu, 15 Feb 2024 15:10:04 -0800 Subject: [PATCH] call OnActiveModeNotification out from onCheckInComplete --- src/app/icd/client/CheckInHandler.cpp | 4 ++++ src/app/icd/client/DefaultCheckInDelegate.cpp | 4 ---- src/app/icd/client/RefreshKeySender.cpp | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/icd/client/CheckInHandler.cpp b/src/app/icd/client/CheckInHandler.cpp index 165301c45480fd..a77b435dbe9d4b 100644 --- a/src/app/icd/client/CheckInHandler.cpp +++ b/src/app/icd/client/CheckInHandler.cpp @@ -22,6 +22,7 @@ * */ +#include #include #include #include @@ -127,6 +128,9 @@ CHIP_ERROR CheckInHandler::OnMessageReceived(Messaging::ExchangeContext * ec, co else { mpCheckInDelegate->OnCheckInComplete(clientInfo); + #if CHIP_CONFIG_ENABLE_READ_CLIENT + InteractionModelEngine::GetInstance()->OnActiveModeNotification(clientInfo.peer_node); + #endif } return CHIP_NO_ERROR; diff --git a/src/app/icd/client/DefaultCheckInDelegate.cpp b/src/app/icd/client/DefaultCheckInDelegate.cpp index 8df98006f6e9e0..e9abe38ebf714e 100644 --- a/src/app/icd/client/DefaultCheckInDelegate.cpp +++ b/src/app/icd/client/DefaultCheckInDelegate.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include #include @@ -38,9 +37,6 @@ void DefaultCheckInDelegate::OnCheckInComplete(const ICDClientInfo & clientInfo) ChipLogProgress( ICD, "Check In Message processing complete: start_counter=%" PRIu32 " offset=%" PRIu32 " nodeid=" ChipLogFormatScopedNodeId, clientInfo.start_icd_counter, clientInfo.offset, ChipLogValueScopedNodeId(clientInfo.peer_node)); -#if CHIP_CONFIG_ENABLE_READ_CLIENT - InteractionModelEngine::GetInstance()->OnActiveModeNotification(clientInfo.peer_node); -#endif } RefreshKeySender * DefaultCheckInDelegate::OnKeyRefreshNeeded(ICDClientInfo & clientInfo, ICDClientStorage * clientStorage) diff --git a/src/app/icd/client/RefreshKeySender.cpp b/src/app/icd/client/RefreshKeySender.cpp index 45cbbd9c987a68..a654f0a4de5094 100644 --- a/src/app/icd/client/RefreshKeySender.cpp +++ b/src/app/icd/client/RefreshKeySender.cpp @@ -64,6 +64,9 @@ CHIP_ERROR RefreshKeySender::RegisterClientWithNewKey(Messaging::ExchangeManager } mpCheckInDelegate->OnCheckInComplete(mICDClientInfo); +#if CHIP_CONFIG_ENABLE_READ_CLIENT + InteractionModelEngine::GetInstance()->OnActiveModeNotification(mICDClientInfo.peer_node); +#endif mpCheckInDelegate->OnKeyRefreshDone(this, CHIP_NO_ERROR); };