@@ -283,7 +283,7 @@ func (p *Processor) N1MessageNotifyProcedure(n1MessageNotify models.N1MessageNot
283283 if registrationCtxtContainer == nil || registrationCtxtContainer .UeContext == nil ||
284284 registrationCtxtContainer .RanNodeId == nil || registrationCtxtContainer .UserLocation == nil ||
285285 registrationCtxtContainer .AnType == "" || registrationCtxtContainer .InitialAmfName == "" ||
286- registrationCtxtContainer .AnN2ApId > 0 {
286+ registrationCtxtContainer .AnN2ApId == nil {
287287 problemDetails := & models.ProblemDetails {
288288 Status : http .StatusBadRequest ,
289289 Cause : "MANDATORY_IE_MISSING" ,
@@ -322,15 +322,16 @@ func (p *Processor) N1MessageNotifyProcedure(n1MessageNotify models.N1MessageNot
322322 return problemDetails
323323 }
324324
325- ranUe := ran .RanUeFindByRanUeNgapID (int64 (registrationCtxtContainer .AnN2ApId ))
325+ anN2ApId := * registrationCtxtContainer .AnN2ApId
326+ ranUe := ran .RanUeFindByRanUeNgapID (int64 (anN2ApId ))
326327 if ranUe == nil {
327328 logger .CallbackLog .Warnf ("RanUe Context[AnN2ApId:%d] not found in RAN[RanId: %+v]" ,
328- registrationCtxtContainer . AnN2ApId , * registrationCtxtContainer .RanNodeId )
329+ anN2ApId , * registrationCtxtContainer .RanNodeId )
329330
330331 problemDetails := & models.ProblemDetails {
331332 Status : http .StatusNotFound ,
332333 Cause : "CONTEXT_NOT_FOUND" ,
333- Detail : fmt .Sprintf ("RanUe Context[AnN2ApId:%d] not found" , registrationCtxtContainer . AnN2ApId ),
334+ Detail : fmt .Sprintf ("RanUe Context[AnN2ApId:%d] not found" , anN2ApId ),
334335 }
335336 return problemDetails
336337 }
@@ -355,9 +356,9 @@ func (p *Processor) N1MessageNotifyProcedure(n1MessageNotify models.N1MessageNot
355356
356357 amfUe .CopyDataFromUeContextModel (ueContext )
357358
358- currentRanUe := ran .RanUeFindByRanUeNgapID (int64 (registrationCtxtContainer . AnN2ApId ))
359+ currentRanUe := ran .RanUeFindByRanUeNgapID (int64 (anN2ApId ))
359360 if currentRanUe == nil {
360- logger .CallbackLog .Warnf ("RanUe not found for AnN2ApId: %d" , registrationCtxtContainer . AnN2ApId )
361+ logger .CallbackLog .Warnf ("RanUe not found for AnN2ApId: %d" , anN2ApId )
361362 return
362363 }
363364
0 commit comments