From 5d97b90bca06e880035817f04eda78a0586217ce Mon Sep 17 00:00:00 2001 From: song-chenxi050 Date: Wed, 22 May 2024 10:19:47 +0000 Subject: [PATCH] bud:When the sessionkey can be matched, set it is Available Signed-off-by: song-chenxi050 --- core/authentication/src/auth_manager.c | 1 + core/authentication/src/auth_session_key.c | 1 + 2 files changed, 2 insertions(+) diff --git a/core/authentication/src/auth_manager.c b/core/authentication/src/auth_manager.c index acb4c2b47f..1401221d4b 100644 --- a/core/authentication/src/auth_manager.c +++ b/core/authentication/src/auth_manager.c @@ -1807,6 +1807,7 @@ static void HandleConnectionData( ReleaseAuthLock(); return; } + auth->hasAuthPassed = true; auth->lastActiveTime = GetCurrentTimeMs(); auth->connId[type] = connId; AuthHandle authHandle = { .authId = authId, .type = GetConnType(connId) }; diff --git a/core/authentication/src/auth_session_key.c b/core/authentication/src/auth_session_key.c index ccec08b872..003e6d66ab 100644 --- a/core/authentication/src/auth_session_key.c +++ b/core/authentication/src/auth_session_key.c @@ -357,6 +357,7 @@ int32_t GetSessionKeyByIndex(const SessionKeyList *list, int32_t index, AuthLink AUTH_LOGE(AUTH_FSM, "get session key fail, index=%{public}d", index); return SOFTBUS_MEM_ERR; } + item->isAvailable = true; item->lastUseTime = GetCurrentTimeMs(); item->useTime[type] = item->lastUseTime; AUTH_LOGI(AUTH_FSM, "get session key succ, index=%{public}d, time=%{public}" PRIu64, index, item->lastUseTime);