X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=pkg%2Fcontrol%2Fcontrol.go;h=cc176c2b711c1c58370a648da6a39f721b50a6ea;hb=7e9c5e52615fef7cbc23de28505e1a7292cdf14f;hp=52571aaf4531c9a635175c42fba19368bf9a4031;hpb=63284a2eed02f5bfec0a237f83aae95adc702c43;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/control.go b/pkg/control/control.go index 52571aa..cc176c2 100755 --- a/pkg/control/control.go +++ b/pkg/control/control.go @@ -28,7 +28,6 @@ import ( httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/spf13/viper" - "math/rand" "sync" "time" ) @@ -57,8 +56,6 @@ type RMRMeid struct { RanName string } -var seedSN uint16 - const ( CREATE Action = 0 MERGE Action = 1 @@ -71,15 +68,6 @@ func init() { viper.AutomaticEnv() viper.SetEnvPrefix("submgr") viper.AllowEmptyEnv(true) - seedSN = uint16(viper.GetInt("seed_sn")) - if seedSN == 0 { - rand.Seed(time.Now().UnixNano()) - seedSN = uint16(rand.Intn(65535)) - } - if seedSN > 65535 { - seedSN = 0 - } - xapp.Logger.Info("SUBMGR: Initial Sequence Number: %v", seedSN) } func NewControl() *Control { @@ -91,7 +79,7 @@ func NewControl() *Control { rtmgrClient := RtmgrClient{client, handle, deleteHandle} registry := new(Registry) - registry.Initialize(seedSN) + registry.Initialize() registry.rtmgrClient = &rtmgrClient tracker := new(Tracker) @@ -265,7 +253,7 @@ func (c *Control) handleSubscriptionResponse(params *RMRParams) { // SubRespMsg, err := c.e2ap.UnpackSubscriptionResponse(params.Payload) if err != nil { - xapp.Logger.Error("SubDelReq: %s Dropping this msg. %s", err.Error(), params.String()) + xapp.Logger.Error("SubResp: %s Dropping this msg. %s", err.Error(), params.String()) return }