!6195 bug:When the sessionkey can be matched, set it is Available

Merge pull request !6195 from 宋晨曦/master
This commit is contained in:
openharmony_ci 2024-05-22 14:48:18 +00:00 committed by Gitee
commit fadbe1d772
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 0 deletions

View File

@ -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) };

View File

@ -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);