- transaction, err := c.tracker.completeTransaction(subId, CREATE)
- if err != nil {
- xapp.Logger.Error("SendSubFail: Failed to delete transaction record. Err:%v. SubId: %v", err, subId)
- return
- }
- xapp.Logger.Info("SendSubFail: SubId: %v, Xid %v, Meid: %v", subId, transaction.OrigParams.Xid, transaction.OrigParams.Meid)
-
- var params xapp.RMRParams
- params.Mtype = 12012 //xapp.RICMessageTypes["RIC_SUB_FAILURE"]
- params.SubId = int(subId)
- params.Meid = transaction.OrigParams.Meid
- params.Xid = transaction.OrigParams.Xid
-
-// newPayload, packErr := c.e2ap.PackSubscriptionFailure(transaction.OrigParams.Payload, subId, causeContent, causeVal)
-// if packErr != nil {
-// xapp.Logger.Error("SendSubFail: PackSubscriptionFailure() due to %v", packErr)
-// return
-// }
-
- newPayload := []byte("40CA4018000003EA7E00050000010016EA6300020021EA74000200C0") // Temporary solution
-
- params.PayloadLen = len(newPayload)
- params.Payload = newPayload
-
- xapp.Logger.Info("SendSubFail: Forwarding failure to xApp: Mtype: %v, SubId: %v, Xid: %s, Meid: %v",params.Mtype, params.SubId, params.Xid, params.Meid)
- err = c.rmrReplyToSender(¶ms)
- if err != nil {
- xapp.Logger.Error("SendSubFail: Failed to send response to xApp. Err: %v, SubId: %v, Xid: %s", err, params.SubId, params.Xid)