diff --git a/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp b/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp index b724d4a62bfb592e0b9abc8b994601fe53b6a9df..1961d8e4e52a9dc8341c9de8c08b55dc5ad408d0 100644 --- a/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp +++ b/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp @@ -616,8 +616,8 @@ void DeviceManagerNotify::OnPublishResult(const std::string &pkgName, int32_t pu void DeviceManagerNotify::OnAuthResult(const std::string &pkgName, const std::string &deviceId, const std::string &token, int32_t status, int32_t reason) { - if (pkgName.empty() || token.empty() || deviceId.empty()) { - LOGE("Invalid para, pkgName: %s, token: %s", pkgName.c_str(), token.c_str()); + if (pkgName.empty() || deviceId.empty()) { + LOGE("Invalid para, pkgName: %s.", pkgName.c_str()); return; } LOGI("DeviceManagerNotify::OnAuthResult in, pkgName:%s, status:%d, reason:%d", pkgName.c_str(), status, reason); diff --git a/services/implementation/src/authentication/dm_auth_manager.cpp b/services/implementation/src/authentication/dm_auth_manager.cpp index 7d61db0befde36d0436dd160084dfdac1a5d4dc3..37290304dd74016379ab42ff6c61974ed9df39bd 100644 --- a/services/implementation/src/authentication/dm_auth_manager.cpp +++ b/services/implementation/src/authentication/dm_auth_manager.cpp @@ -235,8 +235,8 @@ int32_t DmAuthManager::AuthenticateDevice(const std::string &pkgName, int32_t au if (authType == AUTH_TYPE_CRE || authType == AUTH_TYPE_NO_INTER_ACTION) { LOGI("DmAuthManager::AuthenticateDevice for credential type, joinLNN directly."); softbusConnector_->JoinLnn(deviceId); - listener_->OnAuthResult(pkgName, peerTargetId_.deviceId, "", STATUS_DM_AUTH_DEFAULT, DM_OK); - listener_->OnBindResult(pkgName, peerTargetId_, DM_OK, STATUS_DM_AUTH_DEFAULT, ""); + listener_->OnAuthResult(pkgName, peerTargetId_.deviceId, "", STATUS_DM_AUTH_FINISH, DM_OK); + listener_->OnBindResult(pkgName, peerTargetId_, DM_OK, STATUS_DM_AUTH_FINISH, ""); return DM_OK; } InitAuthState(pkgName, authType, deviceId, extra);