From 615c36e3ee9eaa26fdc6f89e0b2c3f45961b231e Mon Sep 17 00:00:00 2001 From: bingo Date: Wed, 14 Sep 2022 14:49:57 +0800 Subject: [PATCH] AuthGetLatestIdByUuid just by OpenSession Signed-off-by: bingo --- .../proxy/src/softbus_proxychannel_manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c b/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c index ff27051ac..82eb7f271 100644 --- a/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c +++ b/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c @@ -871,11 +871,6 @@ int32_t TransProxyCreateChanInfo(ProxyChannelInfo *chan, int32_t channelId, cons { chan->myId = channelId; chan->channelId = channelId; - chan->authId = AuthGetLatestIdByUuid(appInfo->peerData.deviceId, chan->type == CONNECT_TCP); - if (chan->authId == AUTH_INVALID_ID) { - SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "get authId for cipher err"); - return SOFTBUS_ERR; - } if (GenerateRandomStr(chan->identity, sizeof(chan->identity)) != SOFTBUS_OK) { SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "GenerateRandomStr err"); @@ -883,6 +878,11 @@ int32_t TransProxyCreateChanInfo(ProxyChannelInfo *chan, int32_t channelId, cons } if (appInfo->appType != APP_TYPE_AUTH) { + chan->authId = AuthGetLatestIdByUuid(appInfo->peerData.deviceId, chan->type == CONNECT_TCP); + if (chan->authId == AUTH_INVALID_ID) { + SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "get authId for cipher err"); + return SOFTBUS_ERR; + } if (SoftBusGenerateRandomArray((unsigned char *)appInfo->sessionKey, sizeof(appInfo->sessionKey)) != SOFTBUS_OK) { SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "GenerateRandomArray err");