Skip to content

Commit

Permalink
fix: rename func and change var name
Browse files Browse the repository at this point in the history
  • Loading branch information
donald1218 committed Sep 16, 2024
1 parent 30b3798 commit c0bb2bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions internal/gmm/common/user_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ func AttachRanUeToAmfUeAndReleaseOldIfAny(amfUe *context.AmfUe, ranUe *context.R
amfUe.AttachRanUe(ranUe)
}

func AttachRanUeToAmfUeAndReleaseOldIfHandover(amfUe *context.AmfUe, ranUe *context.RanUe) {
if oldRanUe := amfUe.RanUe[ranUe.Ran.AnType]; oldRanUe != nil {
oldRanUe.DetachAmfUe()
func AttachRanUeToAmfUeAndReleaseOldHandover(amfUe *context.AmfUe, sourceRanUe, targetRanUe *context.RanUe) {
if sourceRanUe != nil {
sourceRanUe.DetachAmfUe()
if amfUe.T3550 != nil {
amfUe.State[ranUe.Ran.AnType].Set(context.Registered)
amfUe.State[targetRanUe.Ran.AnType].Set(context.Registered)
}
StopAll5GSMMTimers(amfUe)
causeGroup := ngapType.CausePresentNas
causeValue := ngapType.CauseNasPresentNormalRelease
ngap_message.SendUEContextReleaseCommand(oldRanUe, context.UeContextReleaseHandover, causeGroup, causeValue)
ngap_message.SendUEContextReleaseCommand(sourceRanUe, context.UeContextReleaseHandover, causeGroup, causeValue)
}
amfUe.AttachRanUe(ranUe)
amfUe.AttachRanUe(targetRanUe)
}

func ClearHoldingRanUe(ranUe *context.RanUe) {
Expand Down
2 changes: 1 addition & 1 deletion internal/ngap/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ func handleHandoverNotifyMain(ran *context.AmfRan,
}
}

gmm_common.AttachRanUeToAmfUeAndReleaseOldIfHandover(amfUe, targetUe)
gmm_common.AttachRanUeToAmfUeAndReleaseOldHandover(amfUe, sourceUe, targetUe)
}

// TODO: The UE initiates Mobility Registration Update procedure as described in clause 4.2.2.2.2.
Expand Down

0 comments on commit c0bb2bf

Please sign in to comment.