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=ef27530e14491858efea0884c01815d4d988f98b;hpb=662f68d35c10fa67382235a20e1e08c50359989a;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/control.go b/pkg/control/control.go index ef27530..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)