命名的修改

Signed-off-by: 刘峻朋 <liujunpeng20@huawei.com>
This commit is contained in:
刘峻朋 2024-11-14 06:48:48 +00:00 committed by Gitee
parent 14df0b9f0d
commit 3e60efd5f5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 7 deletions

View File

@ -69,11 +69,11 @@ public:
bool responseSimUnlockPinReady_ = false;
std::mutex ctx_;
std::mutex stx_;
std::mutex rtx_;
std::mutex UnlockPin_ctx_;
std::condition_variable cv_;
std::condition_variable sv_;
std::condition_variable rv_;
std::condition_variable UnlockPin_cv_;
private:
void RequestUnlock(UnlockCmd type);

View File

@ -175,11 +175,11 @@ void SimStateManager::SyncSimMatchResponse()
void SimStateManager::SyncSimUnlockPinResponse()
{
std::unique_lock<std::mutex> lck(rtx_);
std::unique_lock<std::mutex> lck(UnlockPin_ctx_);
responseSimUnlockPinReady_ = true;
TELEPHONY_LOGI(
"SimStateManager::SyncSimUnlockPinResponse(), responsSimUnlockPinReady = %{public}d", responseSimUnlockPinReady_);
rv_.notify_one();
UnlockPin_cv_.notify_one();
}
int32_t SimStateManager::UnlockPin(int32_t slotId, const std::string &pin, LockStatusResponse &response)
@ -188,13 +188,13 @@ int32_t SimStateManager::UnlockPin(int32_t slotId, const std::string &pin, LockS
TELEPHONY_LOGE("simStateHandle_ is nullptr");
return TELEPHONY_ERR_LOCAL_PTR_NULL;
}
std::unique_lock<std::mutex> lck(rtx_);
std::unique_lock<std::mutex> lck(UnlockPin_ctx_);
TELEPHONY_LOGD("SimStateManager::UnlockPin slotId = %{public}d", slotId);
responseSimUnlockPinReady_ = false;
simStateHandle_->UnlockPin(slotId, pin);
while (!responseSimUnlockPinReady_) {
TELEPHONY_LOGI("UnlockPin::wait(), response = false");
if (rv_.wait_for(lck, std::chrono::seconds(WAIT_TIME_LONG_SECOND)) == std::cv_status::timeout) {
if (UnlockPin_cv_.wait_for(lck, std::chrono::seconds(WAIT_TIME_LONG_SECOND)) == std::cv_status::timeout) {
break;
}
}