diff --git a/internal/control_test_engine/gnb/ngap/dispatcher.go b/internal/control_test_engine/gnb/ngap/dispatcher.go index f2afbd0..dda0169 100644 --- a/internal/control_test_engine/gnb/ngap/dispatcher.go +++ b/internal/control_test_engine/gnb/ngap/dispatcher.go @@ -23,7 +23,7 @@ func Dispatch(amf *context.GNBAmf, gnb *context.GNBContext, message []byte) { // decode NGAP message. ngapMsg, err := ngap.Decoder(message) if err != nil { - log.Info("[GNB][NGAP] Error decoding NGAP message in ", gnb.GetGnbId(), " GNB") + log.Error("[GNB][NGAP] Error decoding NGAP message in ", gnb.GetGnbId(), " GNB", ": ", err) } // check RanUeId and get UE. diff --git a/internal/control_test_engine/gnb/ngap/handler.go b/internal/control_test_engine/gnb/ngap/handler.go index 4320f9a..76589ca 100644 --- a/internal/control_test_engine/gnb/ngap/handler.go +++ b/internal/control_test_engine/gnb/ngap/handler.go @@ -834,7 +834,8 @@ func HandlerAmfStatusIndication(amf *context.GNBAmf, gnb *context.GNBContext, me if !ok { return true } - if amf.GetAmfName() == unavailableGuamiItem.BackupAMFName.Value { + if unavailableGuamiItem.BackupAMFName != nil && + amf.GetAmfName() == unavailableGuamiItem.BackupAMFName.Value { backupAmf = amf return false } @@ -842,6 +843,10 @@ func HandlerAmfStatusIndication(amf *context.GNBAmf, gnb *context.GNBContext, me return true }) + if backupAmf == nil { + return + } + amfPool.Range(func(k, v any) bool { oldAmf, ok := v.(*context.GNBAmf) if !ok {