Skip to content
Success

Changes

Summary

  1. ss7_xua_srv: Refactor xua_accept_cb() (details)
Commit 7d72e96d4673185c9e307d935a358876a76838a4 by Pau Espin Pedrol
ss7_xua_srv: Refactor xua_accept_cb()

Move all "readonly" (no state change) checks at the start of the
function. This simplifies the later code paths in the function, also
allowing for more early return checks. This in turn allows simplifying
different destruction code paths of asp and its osmo_stream.

As a result, we can now call existing ss7_asp_disconnect_stream() API to
close the stream when needed, and also make sure we set
asp->xua_server=NULL and remove asp from oxs->siblings when the conn
disconnects, otherwise it could create unexpected states if the config
of the asp changes transport role client<->server or it gets assigned
due to a different oxs due to change in config too.

The new logic also fixes some corner-case scenarios, like (dis)allwoing
newly created dynamic ASPs for already existing previous conn after the
feature configuration has changed.

Change-Id: I191f97e8545ce2f9899e3cd3cc3a7eed854daf1e
The file was modifiedsrc/ss7_xua_srv.c
The file was modifiedsrc/ss7_asp.c