mirror of
https://github.com/openharmony/useriam_auth_executor_mgr.git
synced 2026-07-19 22:53:40 -04:00
fix: code review liuwenkai@huawei.com
Signed-off-by: lwk <1076278852@qq.com>
This commit is contained in:
@@ -29,11 +29,17 @@ uint64_t AuthResManager::Register(std::shared_ptr<ResAuthExecutor> executorInfo,
|
||||
}
|
||||
ExecutorInfo info;
|
||||
std::vector<uint8_t> publicKey;
|
||||
executorInfo->GetAuthType(info.authType);
|
||||
AuthType authType;
|
||||
ExecutorSecureLevel esl;
|
||||
ExecutorType exeType;
|
||||
executorInfo->GetAuthType(authType);
|
||||
executorInfo->GetAuthAbility(info.authAbility);
|
||||
executorInfo->GetExecutorSecLevel(info.esl);
|
||||
executorInfo->GetExecutorType(info.executorType);
|
||||
executorInfo->GetExecutorSecLevel(esl);
|
||||
executorInfo->GetExecutorType(exeType);
|
||||
executorInfo->GetPublicKey(publicKey);
|
||||
info.authType = authType;
|
||||
info.esl = esl;
|
||||
info.executorType = exeType;
|
||||
if (publicKey.size() > PUBLIC_KEY_LEN) {
|
||||
COAUTH_HILOGE(MODULE_SERVICE, "publicKey length too long");
|
||||
return INVALID_EXECUTOR_ID;
|
||||
|
||||
@@ -135,7 +135,7 @@ int32_t AuthResPool::GetScheduleCount(uint64_t scheduleId, uint64_t &scheduleCou
|
||||
}
|
||||
scheduleCount = iter->second->executorNum;
|
||||
COAUTH_HILOGD(MODULE_SERVICE, "get schedule count success");
|
||||
resultCode = SUCCESS;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
int32_t AuthResPool::DeleteScheduleCallback(uint64_t scheduleId)
|
||||
|
||||
@@ -46,7 +46,7 @@ void CoAuthManager::CoAuthHandle(uint64_t scheduleId, AuthInfo &authInfo, sptr<I
|
||||
return callback->OnFinish(FAIL, scheduleToken);
|
||||
}
|
||||
sptr<IRemoteObject::DeathRecipient> dr =
|
||||
new (std::noboolalpha) ResICoAuthCallbackDeathRecipient(scheduleId, this);
|
||||
new (std::nothrow) ResICoAuthCallbackDeathRecipient(scheduleId, this);
|
||||
if (dr == nullptr) {
|
||||
COAUTH_HILOGE(MODULE_SERVICE, "dr is nullptr.");
|
||||
return callback->OnFinish(FAIL, scheduleToken);
|
||||
|
||||
Reference in New Issue
Block a user