Skip to content

Commit 7340bfc

Browse files
committed
fix: dereference anN2ApId after main merge
1 parent 1b7b275 commit 7340bfc

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

internal/sbi/processor/callback.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)