X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fsubscription.go;h=6ea2c1fadcadcf2385942cf9b89afea24752dab4;hb=de457a14f98c546fdb009e9915745ef398388ddd;hp=9342ccc3d30378271f4e383f95a5bc088a62e85e;hpb=9dc5adc78d459157a42ef8997eeced82a3616f01;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/subscription.go b/pkg/control/subscription.go index 9342ccc..6ea2c1f 100644 --- a/pkg/control/subscription.go +++ b/pkg/control/subscription.go @@ -22,6 +22,7 @@ package control import ( "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap" "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp" + //"reflect" "sync" ) @@ -30,16 +31,21 @@ import ( // //----------------------------------------------------------------------------- type Subscription struct { - mutex sync.Mutex // Lock - valid bool // valid - registry *Registry // Registry - ReqId RequestId // ReqId (Requestor Id + Seq Nro a.k.a subsid) - Meid *xapp.RMRMeid // Meid/ RanName - EpList xapp.RmrEndpointList // Endpoints - TransLock sync.Mutex // Lock transactions, only one executed per time for subs - TheTrans TransactionIf // Ongoing transaction - SubReqMsg *e2ap.E2APSubscriptionRequest // Subscription information - SubRFMsg interface{} // Subscription information + mutex sync.Mutex // Lock + valid bool // valid + registry *Registry // Registry + ReqId RequestId // ReqId (Requestor Id + Seq Nro a.k.a subsid) + Meid *xapp.RMRMeid // Meid/ RanName + EpList xapp.RmrEndpointList // Endpoints + TransLock sync.Mutex // Lock transactions, only one executed per time for subs + TheTrans TransactionIf // Ongoing transaction + SubReqMsg *e2ap.E2APSubscriptionRequest // Subscription information + SubRFMsg interface{} // Subscription information + RetryFromXapp bool // Retry form xApp for subscription that already exist + SubRespRcvd bool // Subscription response received + DeleteFromDb bool // Delete subscription form db + NoRespToXapp bool // Send no response for subscription delete to xApp after restart + DoNotWaitSubResp bool // Test flag. Response is not waited for Subscription Request } func (s *Subscription) String() string { @@ -73,10 +79,7 @@ func (s *Subscription) GetReqId() *RequestId { func (s *Subscription) GetMeid() *xapp.RMRMeid { s.mutex.Lock() defer s.mutex.Unlock() - if s.Meid != nil { - return s.Meid - } - return nil + return s.Meid } func (s *Subscription) GetTransaction() TransactionIf {