mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-23 08:00:07 +00:00
fix tel ril crash
Signed-off-by: rsin <renxin20@h-partners.com>
This commit is contained in:
parent
1751bfcdd9
commit
23eb3ad17b
@ -22,7 +22,7 @@ namespace Telephony {
|
||||
std::atomic_int TelRilBase::nextSerialId_(1);
|
||||
std::unordered_map<int32_t, std::shared_ptr<TelRilRequest>> TelRilBase::requestMap_;
|
||||
std::mutex TelRilBase::requestLock_;
|
||||
std::mutex idleLock_;
|
||||
std::mutex dealLock_;
|
||||
std::shared_ptr<TelRilHandler> TelRilBase::handler_;
|
||||
|
||||
TelRilBase::TelRilBase(int32_t slotId, sptr<HDI::Ril::V1_3::IRil> rilInterface,
|
||||
@ -34,13 +34,13 @@ TelRilBase::TelRilBase(int32_t slotId, sptr<HDI::Ril::V1_3::IRil> rilInterface,
|
||||
|
||||
void TelRilBase::ResetRilInterface(sptr<HDI::Ril::V1_3::IRil> rilInterface)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(idleLock_);
|
||||
std::lock_guard<std::mutex> lock(dealLock_);
|
||||
rilInterface_ = rilInterface;
|
||||
}
|
||||
|
||||
sptr<HDI::Ril::V1_3::IRil> TelRilBase::GetRilInterface()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(idleLock_);
|
||||
std::lock_guard<std::mutex> lock(dealLock_);
|
||||
return rilInterface_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user