diff --git a/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp b/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp index 820a997d7c7a647e21883dbc05afbbf508accab5..87aaa180b6e22cdecb1cf36346c45a1d37210d5e 100644 --- a/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp +++ b/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp @@ -977,9 +977,6 @@ int32_t DmAuthMessageProcessor::ParseNegotiateMessage( context->logicalSessionId = jsonObject[DM_TAG_LOGICAL_SESSION_ID].Get(); context->requestId = static_cast(context->logicalSessionId); } - if (IsString(jsonObject, TAG_PEER_PKG_NAME)) { - context->accessee.pkgName = jsonObject[TAG_PEER_PKG_NAME].Get(); - } if (IsString(jsonObject, TAG_PEER_BUNDLE_NAME_V2)) { context->accessee.bundleName = jsonObject[TAG_PEER_BUNDLE_NAME_V2].Get(); } @@ -1006,6 +1003,9 @@ void DmAuthMessageProcessor::ParseAccesserInfo(const JsonObject &jsonObject, context->accesser.pkgName = context->pkgName; context->accessee.pkgName = context->accesser.pkgName; } + if (jsonObject[TAG_PEER_PKG_NAME].IsString()) { + context->accessee.pkgName = jsonObject[TAG_PEER_PKG_NAME].Get(); + } if (jsonObject[TAG_DM_VERSION_V2].IsString()) { context->accesser.dmVersion = jsonObject[TAG_DM_VERSION_V2].Get(); }