Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
bug fix
[ric-plt/submgr.git]
/
pkg
/
control
/
transaction.go
diff --git
a/pkg/control/transaction.go
b/pkg/control/transaction.go
index
c7ca812
..
282d291
100644
(file)
--- a/
pkg/control/transaction.go
+++ b/
pkg/control/transaction.go
@@
-20,11
+20,12
@@
package control
import (
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"
"strconv"
"sync"
"time"
"strconv"
"sync"
"time"
+
+ "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap"
+ "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
)
//-----------------------------------------------------------------------------
)
//-----------------------------------------------------------------------------
@@
-101,12
+102,13
@@
func (t *Transaction) GetMeid() *xapp.RMRMeid {
return nil
}
return nil
}
+/* // This function is not used. Commented out to get better test coverage result
func (t *Transaction) GetPayload() *e2ap.PackedData {
t.mutex.Lock()
defer t.mutex.Unlock()
return t.Payload
}
func (t *Transaction) GetPayload() *e2ap.PackedData {
t.mutex.Lock()
defer t.mutex.Unlock()
return t.Payload
}
-
+*/
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
@@
-129,6
+131,7
@@
func (t *TransactionSubs) Release() {
//
//-----------------------------------------------------------------------------
type TransactionXappKey struct {
//
//-----------------------------------------------------------------------------
type TransactionXappKey struct {
+ InstanceID uint32
xapp.RmrEndpoint
Xid string // xapp xid in req
}
xapp.RmrEndpoint
Xid string // xapp xid in req
}
@@
-172,6
+175,7
@@
func (t *TransactionXapp) GetXid() string {
return ""
}
return ""
}
+/* // This function is not used. Commented out to get better test coverage result
func (t *TransactionXapp) GetSrc() string {
t.mutex.Lock()
defer t.mutex.Unlock()
func (t *TransactionXapp) GetSrc() string {
t.mutex.Lock()
defer t.mutex.Unlock()
@@
-180,7
+184,7
@@
func (t *TransactionXapp) GetSrc() string {
}
return ""
}
}
return ""
}
-
+*/
func (t *TransactionXapp) GetSubId() uint32 {
t.mutex.Lock()
defer t.mutex.Unlock()
func (t *TransactionXapp) GetSubId() uint32 {
t.mutex.Lock()
defer t.mutex.Unlock()
@@
-196,6
+200,9
@@
func (t *TransactionXapp) Release() {
t.mutex.Unlock()
if tracker != nil && xappkey != nil {
t.mutex.Unlock()
if tracker != nil && xappkey != nil {
- tracker.UnTrackTransaction(*xappkey)
+ _, err := tracker.UnTrackTransaction(*xappkey)
+ if err != nil {
+ xapp.Logger.Error("tracker.UnTrackTransaction() failed:%s", err.Error())
+ }
}
}
}
}