!9047 建链选不到引导通道直接返回结果

Merge pull request !9047 from 范妮娜/master
This commit is contained in:
openharmony_ci 2025-02-14 11:04:34 +00:00 committed by Gitee
commit 34ad51a0b9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2473,6 +2473,10 @@ static int32_t GetGuideChannelInfo(const LinkRequest *request, WdGuideType *guid
guideList[(*linksNum)++] = LANE_NEW_AUTH_NEGO;
}
}
if (*linksNum == 0) {
LNN_LOGE(LNN_LANE, "there is none guide channel can be used.");
return SOFTBUS_LANE_GUIDE_BUILD_FAIL;
}
return SOFTBUS_OK;
}
@ -2521,11 +2525,6 @@ static int32_t LnnSelectDirectLink(uint32_t laneReqId, LaneLinkType linkType)
LNN_LOGE(LNN_LANE, "get guide channel info fail.");
return SOFTBUS_LANE_NOT_FOUND;
}
if (guideInfo.guideIdx >= guideInfo.guideNum) {
LNN_LOGE(LNN_LANE, "all guide channel type have been tried.");
DelGuideInfoItem(laneReqId, linkType);
return SOFTBUS_LANE_GUIDE_BUILD_FAIL;
}
WdGuideType guideType = guideInfo.guideList[guideInfo.guideIdx];
LNN_LOGI(LNN_LANE, "build guide channel, laneReqId=%{public}u, guideType=%{public}d.", laneReqId, guideType);
return g_channelTable[guideType](&guideInfo.request, laneReqId, &guideInfo.callback);