Skip to content

Commit

Permalink
fix: add comment and log
Browse files Browse the repository at this point in the history
  • Loading branch information
andy89923 committed Sep 17, 2024
1 parent c0bb2bf commit cc4682b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/gmm/common/user_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func AttachRanUeToAmfUeAndReleaseOldIfAny(amfUe *context.AmfUe, ranUe *context.R
}

func AttachRanUeToAmfUeAndReleaseOldHandover(amfUe *context.AmfUe, sourceRanUe, targetRanUe *context.RanUe) {
logger.GmmLog.Debugln("In AttachRanUeToAmfUeAndReleaseOldHandover")

if sourceRanUe != nil {
sourceRanUe.DetachAmfUe()
if amfUe.T3550 != nil {
Expand All @@ -79,6 +81,9 @@ func AttachRanUeToAmfUeAndReleaseOldHandover(amfUe *context.AmfUe, sourceRanUe,
causeGroup := ngapType.CausePresentNas
causeValue := ngapType.CauseNasPresentNormalRelease
ngap_message.SendUEContextReleaseCommand(sourceRanUe, context.UeContextReleaseHandover, causeGroup, causeValue)
} else {
// This function will be call only by N2 Handover, so we can assume sourceRanUe will not be nil
logger.GmmLog.Errorln("AttachRanUeToAmfUeAndReleaseOldHandover() is called but sourceRanUe is nil")
}
amfUe.AttachRanUe(targetRanUe)
}
Expand Down

0 comments on commit cc4682b

Please sign in to comment.