diff --git a/interfaces/kits/js4.0/src/native_devicemanager_js.cpp b/interfaces/kits/js4.0/src/native_devicemanager_js.cpp index f50d257507961a1dd7ca552fcdf390e6169a5c8b..cdd18f78ccd7186551620ba4c2b6c1a9080f126a 100644 --- a/interfaces/kits/js4.0/src/native_devicemanager_js.cpp +++ b/interfaces/kits/js4.0/src/native_devicemanager_js.cpp @@ -50,7 +50,7 @@ namespace { const std::string DM_NAPI_EVENT_DEVICE_STATE_CHANGE = "deviceStateChange"; const std::string DM_NAPI_EVENT_DEVICE_DISCOVER_SUCCESS = "discoverSuccess"; -const std::string DM_NAPI_EVENT_DEVICE_DISCOVER_FAIL = "discoverFail"; +const std::string DM_NAPI_EVENT_DEVICE_DISCOVER_FAIL = "discoverFailure"; const std::string DM_NAPI_EVENT_DEVICE_PUBLISH_SUCCESS = "publishSuccess"; const std::string DM_NAPI_EVENT_DEVICE_PUBLISH_FAIL = "publishFail"; const std::string DM_NAPI_EVENT_DEVICE_SERVICE_DIE = "serviceDie"; @@ -677,7 +677,7 @@ void DeviceManagerNapi::OnDiscoveryFailed(uint16_t subscribeId, int32_t failedRe SetValueInt32(env_, "reason", (int)failedReason, result); std::string errCodeInfo = OHOS::DistributedHardware::GetErrorString((int)failedReason); SetValueUtf8String(env_, "errInfo", errCodeInfo, result); - OnEvent("discoverFail", DM_NAPI_ARGS_ONE, &result); + OnEvent("discoverFailure", DM_NAPI_ARGS_ONE, &result); napi_close_handle_scope(env_, scope); } diff --git a/services/implementation/include/authentication_v2/dm_auth_state.h b/services/implementation/include/authentication_v2/dm_auth_state.h index f1857b8f1698cd3aed6b0b43f33843aedba4f2d4..4a241b935c0c3498ef23ee48a9157a6248f2d1a5 100644 --- a/services/implementation/include/authentication_v2/dm_auth_state.h +++ b/services/implementation/include/authentication_v2/dm_auth_state.h @@ -201,7 +201,7 @@ protected: class AuthSrcConfirmState : public DmAuthState { public: - virtual ~AuthSrcConfirmState() {}; + virtual ~AuthSrcConfirmState(); DmAuthStateType GetStateType() override; int32_t Action(std::shared_ptr context) override; private: @@ -239,7 +239,7 @@ private: void GetCustomDescBySinkLanguage(std::shared_ptr context); void ResetBindLevel(std::shared_ptr context); void NegotiateUltrasonic(std::shared_ptr context); - void GenerateCertificate(std::shared_ptr context); + static void GenerateCertificate(std::shared_ptr context); }; class AuthSinkStatePinAuthComm { diff --git a/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp b/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp index 6541397024d672c281eb8fe9ed6b1c9fa92863fa..ddd593d101593d6eff2aca73affd7668faba3b92 100644 --- a/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp +++ b/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp @@ -53,6 +53,11 @@ static std::map g_pinAuthTypeFallBackMap = { // Maximum number of recursive lookups constexpr size_t MAX_FALLBACK_LOOPKUP_TIMES = 2; +AuthSrcConfirmState::~AuthSrcConfirmState() +{ + LOGI("AuthSrcConfirmState destructor."); +} + DmAuthStateType AuthSrcConfirmState::GetStateType() { return DmAuthStateType::AUTH_SRC_CONFIRM_STATE;