Skip to content

Commit

Permalink
fix: Removes stop of UpdateConfig channel loop when 1 item has no net…
Browse files Browse the repository at this point in the history
…work slice (#137)

* fix: dont stop channel loop if 1 item has no network slice

* adds actual bad  behaving piece of code
  • Loading branch information
gruyaume authored Nov 23, 2023
1 parent 7b11b38 commit 5ce4faa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions service/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,6 @@ func (amf *AMF) UpdateConfig(commChannel chan *protos.NetworkSliceResponse) bool
for rsp := range commChannel {
logger.GrpcLog.Infof("Received updateConfig in the amf app : %v", rsp)
var tai []models.Tai
var plmnList []*factory.PlmnSupportItem
if rsp.NetworkSlice == nil {
return false
}
for _, ns := range rsp.NetworkSlice {
var snssai *models.Snssai
logger.GrpcLog.Infoln("Network Slice Name ", ns.Name)
Expand Down Expand Up @@ -652,7 +648,6 @@ func (amf *AMF) UpdateConfig(commChannel chan *protos.NetworkSliceResponse) bool
logger.GrpcLog.Infoln("Plmn mcc ", site.Plmn.Mcc)
plmn.PlmnId.Mnc = site.Plmn.Mnc
plmn.PlmnId.Mcc = site.Plmn.Mcc
plmnList = append(plmnList, plmn)

if ns.Nssai != nil {
plmn.SNssaiList = append(plmn.SNssaiList, *snssai)
Expand All @@ -673,7 +668,7 @@ func (amf *AMF) UpdateConfig(commChannel chan *protos.NetworkSliceResponse) bool
logger.GrpcLog.Infoln("Plmn not present in the message ")
}
}
} // end of network slice for loop
}

// Update PlmnSupportList/ServedGuamiList/ServedTAIList in Amf Config
// factory.AmfConfig.Configuration.ServedGumaiList = nil
Expand Down

0 comments on commit 5ce4faa

Please sign in to comment.