Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions consumer/nf_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ var SendNfDiscoveryToNrf = func(nrfUri string, targetNfType, requesterNfType mod
if res != nil && res.StatusCode == http.StatusTemporaryRedirect {
err = fmt.Errorf("temporary redirect for non NRF consumer")
}
defer func() {
if bodyCloseErr := res.Body.Close(); bodyCloseErr != nil {
err = fmt.Errorf("SearchNFInstances' response body cannot close: %w", bodyCloseErr)
}
}()
if res != nil && res.Body != nil {
defer func() {
if bodyCloseErr := res.Body.Close(); bodyCloseErr != nil {
err = fmt.Errorf("SearchNFInstances' response body cannot close: %w", bodyCloseErr)
}
}()
} else {
logger.ConsumerLog.Error("Response nil from NRF for SearchNFInstances")
}

udmSelf := udmContext.UDM_Self()
var nrfSubData models.NrfSubscriptionData
Expand All @@ -82,6 +86,7 @@ var SendNfDiscoveryToNrf = func(nrfUri string, targetNfType, requesterNfType mod
}

func SendNFInstancesUDR(id string, types int) string {
logger.ConsumerLog.Infof("Sending NRF discovery for SUPI=%s", id)
self := udmContext.UDM_Self()
targetNfType := models.NfType_UDR
requestNfType := models.NfType_UDM
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/omec-project/udm
go 1.24.0

require (
github.com/5GC-DEV/openapi-cdac v0.4.1
github.com/antihax/optional v1.0.0
github.com/gin-gonic/gin v1.10.1
github.com/google/uuid v1.6.0
Expand All @@ -17,6 +16,7 @@ require (
)

require (
github.com/5GC-DEV/openapi-cdac v0.4.2 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.13.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/5GC-DEV/openapi-cdac v0.4.1 h1:EFGYKz6D+k2tI4fEvSDAJseVo3amgoZEK3tVrp5znec=
github.com/5GC-DEV/openapi-cdac v0.4.1/go.mod h1:KLX5UeLe67E9SQC/vVNArCa4KK4luoDNAS0kRGkdE74=
github.com/5GC-DEV/openapi-cdac v0.4.2 h1:nHHusGmBkFOqjyJgvf8JOlJ2GlrF71aFD+HRzjGg904=
github.com/5GC-DEV/openapi-cdac v0.4.2/go.mod h1:KLX5UeLe67E9SQC/vVNArCa4KK4luoDNAS0kRGkdE74=
github.com/5GC-DEV/openapi-cdac v1.0.0/go.mod h1:TFxV/NlwA7waEk3BqH6baTQ8oWpPMRDFC1YCEpPjl04=
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
Expand Down
Loading