From 5fc89493d1227314a0314a96b13b3185721280a7 Mon Sep 17 00:00:00 2001 From: "yanxiaotao@huawei.com" Date: Sun, 3 Dec 2023 09:46:15 +0800 Subject: [PATCH] bugfix for crash test Signed-off-by: yanxiaotao@huawei.com --- .../wifi_framework/wifi_manage/wifi_device_stub.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_device_stub.cpp b/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_device_stub.cpp index 0ee165708..c3f0900c1 100644 --- a/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_device_stub.cpp +++ b/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_device_stub.cpp @@ -170,7 +170,8 @@ void WifiDeviceStub::RemoveDeviceCbDeathRecipient(void) void WifiDeviceStub::RemoveDeviceCbDeathRecipient(const wptr &remoteObject) { - WIFI_LOGI("RemoveDeathRecipient, remoteObject: %{private}p!", &remoteObject); + WIFI_LOGI("RemoveDeathRecipient, remoteObject: %{public}p!", &remoteObject); + WIFI_LOGI("RemoveDeathRecipient, remoteObject.promote: %{public}p!", remoteObject.promote()); std::lock_guard lock(mutex_); RemoteDeathMap::iterator iter = remoteDeathMap.find(remoteObject.promote()); if (iter == remoteDeathMap.end()) { @@ -184,7 +185,7 @@ void WifiDeviceStub::RemoveDeviceCbDeathRecipient(const wptr &rem void WifiDeviceStub::OnRemoteDied(const wptr &remoteObject) { - WIFI_LOGI("OnRemoteDied, Remote is died! remoteObject: %{private}p", &remoteObject); + WIFI_LOGI("OnRemoteDied, Remote is died! remoteObject: %{public}p", &remoteObject); WifiInternalEventDispatcher::GetInstance().RemoveStaCallback(remoteObject.promote()); // RemoveDeviceCbDeathRecipient(remoteObject); WIFI_LOGI("yxt OnRemoteDied, do NOT remove death!!", &remoteObject); @@ -788,10 +789,11 @@ void WifiDeviceStub::OnRegisterCallBack(uint32_t code, MessageParcel &data, Mess #else deathRecipient_ = new (std::nothrow) WifiDeathRecipient(*this); remoteDeathMap.insert(std::make_pair(remote, deathRecipient_)); + WIFI_LOGI("OnRegisterCallBack, add deathRecipient, : %{public}p", remote); #endif } if ((remote->IsProxyObject()) && (!remote->AddDeathRecipient(deathRecipient_))) { - WIFI_LOGD("AddDeathRecipient!"); + WIFI_LOGI("AddDeathRecipient!"); } if (callback_ != nullptr) { for (const auto &eventName : event) {