-/*
-Retreives the transaction table entry for the given request.
-Returns error in case the transaction cannot be found.
-*/
-func (t *Tracker) UpdateTransaction(SubID uint16, transType Action, xact Transaction) error {
- key := TransactionKey{SubID, transType}
- t.mutex.Lock()
- defer t.mutex.Unlock()
- if _, ok := t.transactionTable[key]; ok {
- // TODO: Implement merge related check here. If the key is same but the value is different.
- err := fmt.Errorf("transaction tracker: Similar transaction with sub id %d and type %v is ongoing", key.SubID, key.transType)
- return err
+func (t *Tracker) NewXappTransaction(
+ endpoint *RmrEndpoint,
+ xid string,
+ reqId *RequestId,
+ meid *xapp.RMRMeid) *TransactionXapp {
+
+ trans := &TransactionXapp{}
+ trans.XappKey = &TransactionXappKey{*endpoint, xid}
+ trans.Meid = meid
+ if reqId != nil {
+ trans.ReqId = *reqId