代码拉取完成,页面将自动刷新
package producer
import (
"net/http"
"gitee.com/liu-zhao234568/amf/context"
"gitee.com/liu-zhao234568/amf/logger"
"github.com/free5gc/http_wrapper"
"github.com/free5gc/openapi/models"
)
func HandleProvideDomainSelectionInfoRequest(request *http_wrapper.Request) *http_wrapper.Response {
logger.MtLog.Info("Handle Provide Domain Selection Info Request")
ueContextID := request.Params["ueContextId"]
infoClassQuery := request.Query.Get("info-class")
supportedFeaturesQuery := request.Query.Get("supported-features")
ueContextInfo, problemDetails := ProvideDomainSelectionInfoProcedure(ueContextID,
infoClassQuery, supportedFeaturesQuery)
if problemDetails != nil {
return http_wrapper.NewResponse(int(problemDetails.Status), nil, problemDetails)
} else {
return http_wrapper.NewResponse(http.StatusOK, nil, ueContextInfo)
}
}
func ProvideDomainSelectionInfoProcedure(ueContextID string, infoClassQuery string, supportedFeaturesQuery string) (
*models.UeContextInfo, *models.ProblemDetails) {
amfSelf := context.AMF_Self()
ue, ok := amfSelf.AmfUeFindByUeContextID(ueContextID)
if !ok {
problemDetails := &models.ProblemDetails{
Status: http.StatusNotFound,
Cause: "CONTEXT_NOT_FOUND",
}
return nil, problemDetails
}
ueContextInfo := new(models.UeContextInfo)
// TODO: Error Status 307, 403 in TS29.518 Table 6.3.3.3.3.1-3
anType := ue.GetAnType()
if anType != "" && infoClassQuery != "" {
ranUe := ue.RanUe[anType]
ueContextInfo.AccessType = anType
ueContextInfo.LastActTime = ranUe.LastActTime
ueContextInfo.RatType = ue.RatType
ueContextInfo.SupportedFeatures = ranUe.SupportedFeatures
ueContextInfo.SupportVoPS = ranUe.SupportVoPS
ueContextInfo.SupportVoPSn3gpp = ranUe.SupportVoPSn3gpp
}
return ueContextInfo, nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。