pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41500?usp=email )
Change subject: ss7_xua_server_destroy(): Disconnect streams properly ......................................................................
ss7_xua_server_destroy(): Disconnect streams properly
destroying ASPs is wrong, since that'd also destroy non-dynamic ASPs, hence erasing the configuration. Instead, close oly the stream, and dynamic ASPs get destroyed as a consequence.
Change-Id: I1309015053d2bd22d8fdf6298f8918a47527340e --- M src/ss7_xua_srv.c 1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/00/41500/1
diff --git a/src/ss7_xua_srv.c b/src/ss7_xua_srv.c index 077eea0..a97b07f 100644 --- a/src/ss7_xua_srv.c +++ b/src/ss7_xua_srv.c @@ -397,11 +397,13 @@ if (xs->server) { osmo_stream_srv_link_close(xs->server); osmo_stream_srv_link_destroy(xs->server); + xs->server = NULL; } - /* iterate and close all connections established in relation - * with this server */ + + /* iterate and close all connections established in relation with this server. + * Dynamic ASPs in SCTP=server are destroyed when connection is closed. */ llist_for_each_entry_safe(asp, asp2, &xs->asp_list, siblings) - osmo_ss7_asp_destroy(asp); + ss7_asp_disconnect_stream(asp);
llist_del(&xs->list); talloc_free(xs);