xapp-frame v0.8.2 integration to submgr
[ric-plt/submgr.git] / pkg / control / tracker.go
index 46971d9..df3d56e 100644 (file)
@@ -21,6 +21,7 @@ package control
 
 import (
        "fmt"
+       "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap"
        "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
        "sync"
 )
@@ -58,13 +59,13 @@ func (t *Tracker) NewSubsTransaction(subs *Subscription) *TransactionSubs {
 func (t *Tracker) NewXappTransaction(
        endpoint *xapp.RmrEndpoint,
        xid string,
-       subid uint32,
+       requestId e2ap.RequestId,
        meid *xapp.RMRMeid) *TransactionXapp {
 
        trans := &TransactionXapp{}
-       trans.XappKey = &TransactionXappKey{*endpoint, xid}
+       trans.XappKey = &TransactionXappKey{requestId.Id, *endpoint, xid}
        trans.Meid = meid
-       trans.SubId = subid
+       trans.RequestId = requestId
        t.initTransaction(&trans.Transaction)
        xapp.Logger.Debug("CREATE %s", trans.String())
        return trans
@@ -103,5 +104,5 @@ func (t *Tracker) UnTrackTransaction(xappKey TransactionXappKey) (*TransactionXa
                //xapp.Logger.Debug("Tracker: transtable=%v", t.transactionXappTable)
                return trans, nil
        }
-       return nil, fmt.Errorf("Tracker: No record %s", xappKey)
+       return nil, fmt.Errorf("Tracker: No record %v", xappKey)
 }