-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update handler.go #113
Update handler.go #113
Conversation
please fix the linter error |
731263b
to
e65bdd9
Compare
9d72595
to
76557fc
Compare
This PR fix the issue: free5gc/free5gc#413 |
@@ -99,6 +99,9 @@ func SearchAmfCommunicationInstance(ue *amf_context.AmfUe, nrfUri string, target | |||
// select the first AMF, TODO: select base on other info | |||
var amfUri string | |||
for _, nfProfile := range resp.NfInstances { | |||
if nfProfile.NfInstanceId == amf_context.GetSelf().NfId { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this check added because you got the current AMF as the query response from NRF? If that is the case, I think it is the query condition that has an issue to be fixed. (The exclusion check is fine and can be kept here since it is impossible to communicate with AMF itself. Just want to make sure if the codes of querying the target AMF is correct or not.)
@@ -1226,6 +1236,7 @@ func handleRequestedNssai(ue *context.AmfUe, anType models.AccessType) error { | |||
// Condition (B) Step 7: initial AMF can not find Target AMF via NRF -> Send Reroute NAS Request to RAN | |||
allowedNssaiNgap := ngapConvert.AllowedNssaiToNgap(ue.AllowedNssai[anType]) | |||
ngap_message.SendRerouteNasRequest(ue, anType, nil, ue.RanUe[anType].InitialUEMessage, &allowedNssaiNgap) | |||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be also considered for line 1234 callback.SendN1MessageNotifyAtAMFReAllocation(ue, n1Message.Bytes(), ®isterContext)
? Otherwise, will RegAceept be sent by the current AMF even when it requests for AMF Re-allocation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leon777-coder, Please add error return after line 1234.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it what the line 1241 doing?
Whenever this handler reach the needSliceSelection
state (which goes all the way down to the line 1234 if no error occurs), it will return nil
there (the line 1241). No further operation will be executed. Not to mention RegAccept
in this situation.
return error added
line 1235 [return nill] deleted, since it will reach the following return
issue#413