Skip to content

Commit

Permalink
fix: advise location uri to smf new format
Browse files Browse the repository at this point in the history
  • Loading branch information
reki9185 committed Feb 21, 2025
1 parent c30a11b commit d443476
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/sbi/consumer/smf_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"net/url"
"strconv"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -173,7 +174,12 @@ func (s *nsmfService) SendCreateSmContextRequest(ue *amf_context.AmfUe, smContex
postSmContextReponse, localErr := client.SMContextsCollectionApi.
PostSmContexts(ctx, &postSmContextsRequest)
if localErr == nil {
smContextRef = postSmContextReponse.Location
location := postSmContextReponse.Location

parts := strings.Split(location, "/")
location = parts[len(parts)-1]

smContextRef = "urn:uuid:" + location
} else {
err1 = localErr
switch errType := localErr.(type) {
Expand Down

0 comments on commit d443476

Please sign in to comment.