From 44825f40648144d8618114675e4c16c5e0393793 Mon Sep 17 00:00:00 2001 From: "CTFang@WireLab" Date: Thu, 7 Nov 2024 15:08:10 +0000 Subject: [PATCH] fix: update openapi hash and fix nil pointer bug --- go.mod | 6 +++--- go.sum | 12 ++++++------ internal/sbi/processor/ue_context.go | 5 +++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 23af159..20051cc 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 github.com/davecgh/go-spew v1.1.1 github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f - github.com/free5gc/nas v1.1.4-0.20240801045646-998afcbf3811 - github.com/free5gc/ngap v1.0.9-0.20240801044503-4db04dae3900 - github.com/free5gc/openapi v1.0.9-0.20241105014927-c376b9f16133 + github.com/free5gc/nas v1.1.4-0.20241107083120-4605e0d39ece + github.com/free5gc/ngap v1.0.9-0.20241107082718-d359a67ebfa2 + github.com/free5gc/openapi v1.0.9-0.20241107150130-49bc53042288 github.com/free5gc/sctp v1.0.1 github.com/free5gc/util v1.0.6 github.com/gin-gonic/gin v1.9.1 diff --git a/go.sum b/go.sum index 50262ae..c45658d 100644 --- a/go.sum +++ b/go.sum @@ -23,12 +23,12 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f h1:sO8FFwAq7feSw/vKN9ioY+fX1gNTXd6/xQOqaeclzsA= github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f/go.mod h1:oh3dtNsje2W4/q3pfidMWQKXbXIehXK3t6CD9tXmHx0= -github.com/free5gc/nas v1.1.4-0.20240801045646-998afcbf3811 h1:S/4FPVGQm4xYNxRLd487hOfz/f7S5taPFO8MFLqjADo= -github.com/free5gc/nas v1.1.4-0.20240801045646-998afcbf3811/go.mod h1:mVpI5guYTI24b9/cqnzilfHZa5nQeiLAh39/pVz9WrI= -github.com/free5gc/ngap v1.0.9-0.20240801044503-4db04dae3900 h1:ZElji98JSdDEJuUtpHGuV0L+xCY5ePs3YolqVfDR9Ig= -github.com/free5gc/ngap v1.0.9-0.20240801044503-4db04dae3900/go.mod h1:HedQCbA/XoFgO3wnNSNhIpp5Dhv0f42lLMT/EiEyAQ0= -github.com/free5gc/openapi v1.0.9-0.20241105014927-c376b9f16133 h1:kteBxWKtc15ngTG+BmGBTpW4xIddxPde01TlmcHcngg= -github.com/free5gc/openapi v1.0.9-0.20241105014927-c376b9f16133/go.mod h1:aKw6uGzEibGDrn9++w4/JpWxaaUBo7GaqsvuFKU9fl4= +github.com/free5gc/nas v1.1.4-0.20241107083120-4605e0d39ece h1:IC+OGynaXwurS2RIfno+2aKjlaFRQ6koZrC2QQu5yJ0= +github.com/free5gc/nas v1.1.4-0.20241107083120-4605e0d39ece/go.mod h1:/k8oW94r7D+lKAIFSIxZz0Qg/0tod/+oCJbsVZ2E7SU= +github.com/free5gc/ngap v1.0.9-0.20241107082718-d359a67ebfa2 h1:LMqqxvoDZAoG9xtfd5hhOiIDnPawSVcYof1nb6IkoWE= +github.com/free5gc/ngap v1.0.9-0.20241107082718-d359a67ebfa2/go.mod h1:uw13NF8Zdqp9LXlQCn9Xp2Ju3LSyki0GTyWEUAbUDbk= +github.com/free5gc/openapi v1.0.9-0.20241107150130-49bc53042288 h1:W6YDZM21YvxiDeaTm49oCucfQyRrjixzYAgLJSZvPBo= +github.com/free5gc/openapi v1.0.9-0.20241107150130-49bc53042288/go.mod h1:aKw6uGzEibGDrn9++w4/JpWxaaUBo7GaqsvuFKU9fl4= github.com/free5gc/sctp v1.0.1 h1:g8WDO97r8B9ubkT5Hyk9b4I1fZUOii9Z39gQ2eRaASo= github.com/free5gc/sctp v1.0.1/go.mod h1:7QXfRWCmlkBGD0EIu3qL5o71bslfIakydz4h2QDZdjQ= github.com/free5gc/util v1.0.6 h1:dBt9drcXtYKE/cY5XuQcuffgsYclPIpIArhSeS6M+DQ= diff --git a/internal/sbi/processor/ue_context.go b/internal/sbi/processor/ue_context.go index c735805..5a9838f 100644 --- a/internal/sbi/processor/ue_context.go +++ b/internal/sbi/processor/ue_context.go @@ -534,8 +534,9 @@ func (p *Processor) AssignEbiDataProcedure(ueContextID string, assignEbiData mod // TODO: AssignEbiError not used, check it! if _, okSmContextFind := ue.SmContextFindByPDUSessionID(assignEbiData.PduSessionId); okSmContextFind { - var assignedEbiData *models.AssignedEbiData - assignedEbiData.PduSessionId = assignEbiData.PduSessionId + assignedEbiData := &models.AssignedEbiData{ + PduSessionId: assignEbiData.PduSessionId, + } return assignedEbiData, nil, nil } logger.ProducerLog.Errorf("SmContext[PDU Session ID:%d] not found", assignEbiData.PduSessionId)