Skip to content
Success

Changes

Summary

  1. Pass ownership of Tx xua_msg down the stack [1/2] (details)
Commit ad4bed6fd7a01e77933270f1219d6a03df68c4b2 by Pau Espin Pedrol
Pass ownership of Tx xua_msg down the stack [1/2]

This is a first step towards getting MTP OPC & SLS fields down the stack
so that they can be used to implement loadsharing at ASP level.
So far, we always encode the xua_msg (which holds the OPC and SLS info
into xua_msg->mtp) into a msgb before passing it to as->fi through event
XUA_AS_E_TRANSFER_REQ, which in turn calls xua_as_transmit_msg(as, msg).

This patch is part 1 of 2 patches, which only modifies mostly the
Tx path, but still requires modifications on Rx path (done in patch 2/2)
to properly handle the forwarding path from Rx to Tx without double
freeing. It is submitted in 2 parts to ease code reviewing.

Future patches will modify that code to pass a xua_msg and only
encode it into a msgb deeper into the stack after an ASP has been
selected and msg needs to be transmitted.

All previous calls to sua_tx_xua_asp() actually had a memory leak before
this change, hence why no xua_msg_free() is removed from callers in this
patch. Since now ownership is taken by sua_tx_xua_asp() which always
frees the xua msg, the memleak is fixed.

Change-Id: I49e718e624da08510a9c3d28bdb360c59f9a65d3
The file was modifiedsrc/ipa.c
The file was modifiedsrc/m3ua.c
The file was modifiedsrc/osmo_ss7_hmrt.c
The file was modifiedsrc/sua.c