This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: introduce new osmo_ss7_asp_disconnect() function ...................................................................... introduce new osmo_ss7_asp_disconnect() function Higher-layer code shouldn't have to worry between client and server difference. It just wants to close the underlying connection for a given ASP - which it now can by means of osmo_ss7_asp_disconnect(). Change-Id: I36b089abd281b8edac8830fda2d8e57cc06cd0a7 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index a8c1c3c..76403e2 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -309,6 +309,7 @@ void osmo_ss7_as_destroy(struct osmo_ss7_as *as); bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp); +void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp); /*********************************************************************** diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 2d34b53..4aa7be5 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1543,6 +1543,15 @@ return 0; } +void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp) +{ + if (asp->server) + osmo_stream_srv_destroy(asp->server); + /* the close_cb() will handle the remaining cleanup here */ + else if (asp->client) + xua_cli_close_and_reconnect(asp->client); +} + /*********************************************************************** * SS7 xUA Server ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/2364 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36b089abd281b8edac8830fda2d8e57cc06cd0a7 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder