Skip to content

Commit

Permalink
call OnActiveModeNotification out from onCheckInComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed Feb 16, 2024
1 parent a71f814 commit 071c0f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/app/icd/client/CheckInHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*
*/

#include <app/InteractionModelEngine.h>
#include <app/InteractionModelTimeout.h>
#include <app/icd/client/CheckInHandler.h>
#include <app/icd/client/RefreshKeySender.h>
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions src/app/icd/client/DefaultCheckInDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

#include <app/InteractionModelEngine.h>
#include <app/icd/client/DefaultCheckInDelegate.h>
#include <app/icd/client/RefreshKeySender.h>
#include <crypto/CHIPCryptoPAL.h>
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/app/icd/client/RefreshKeySender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 071c0f7

Please sign in to comment.