Skip to content

Commit

Permalink
fix: missing nf res in registernf and type assertion in smf
Browse files Browse the repository at this point in the history
  • Loading branch information
donald1218 committed Oct 24, 2024
1 parent db8f201 commit b100d28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/sbi/consumer/nrf_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ func (s *nnrfService) SendRegisterNFInstance(ctx context.Context, nrfUri, nfInst
} else {
// NFRegister
resourceUri := res.Location
nf = res.NrfNfManagementNfProfile
index := strings.Index(resourceUri, "/nnrf-nfm/")
if index >= 0 {
resouceNrfUri = resourceUri[:index]
Expand Down Expand Up @@ -326,6 +327,7 @@ func (s *nnrfService) SendDeregisterNFInstance() (problemDetails *models.Problem
// API error
derigister_err := apiErr.Model().(Nnrf_NFManagement.DeregisterNFInstanceError)
problemDetails = &derigister_err.ProblemDetails
logger.CommLog.Error(problemDetails)
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/sbi/consumer/smf_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (s *nsmfService) SendCreateSmContextRequest(ue *amf_context.AmfUe, smContex
err1 = localErr
if apiErr, ok := localErr.(openapi.GenericOpenAPIError); ok {
// API error
posterr := apiErr.Model().(*Nsmf_PDUSession.PostSmContextsError)
posterr := apiErr.Model().(Nsmf_PDUSession.PostSmContextsError)
problemDetail = &posterr.ProblemDetails
errorResponse = &posterr.PostSmContextsError
}
Expand Down

0 comments on commit b100d28

Please sign in to comment.