Add support for Insert type subscriptions
[ric-plt/submgr.git] / pkg / control / transaction.go
index 56dff1d..f722d11 100644 (file)
@@ -52,7 +52,11 @@ type Transaction struct {
 }
 
 func (t *Transaction) String() string {
-       return "trans(" + strconv.FormatUint(uint64(t.Seq), 10) + "/" + t.Meid.RanName + ")"
+       meidstr := "N/A"
+       if t.Meid != nil {
+               meidstr = t.Meid.String()
+       }
+       return "trans(" + strconv.FormatUint(uint64(t.Seq), 10) + "/" + meidstr + ")"
 }
 
 func (t *Transaction) SendEvent(event interface{}, waittime time.Duration) (bool, bool) {
@@ -125,7 +129,7 @@ func (t *TransactionSubs) Release() {
 //
 //-----------------------------------------------------------------------------
 type TransactionXappKey struct {
-       RmrEndpoint
+       xapp.RmrEndpoint
        Xid string // xapp xid in req
 }
 
@@ -150,7 +154,7 @@ func (t *TransactionXapp) String() string {
        return "transxapp(" + t.Transaction.String() + "/" + transkey + "/" + strconv.FormatUint(uint64(t.SubId), 10) + ")"
 }
 
-func (t *TransactionXapp) GetEndpoint() *RmrEndpoint {
+func (t *TransactionXapp) GetEndpoint() *xapp.RmrEndpoint {
        t.mutex.Lock()
        defer t.mutex.Unlock()
        if t.XappKey != nil {