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.org
osmo_ss7: make sure to re-set all state on client disconnect
When we disconnect a client, make sure that we always go through
xua_cli_close_and_reconnect(), which will make sure to notify the ASP
FSM using XUA_ASP_E_SCTP_COMM_DOWN_IND.
Change-Id: I6859b8549c8cbbe2e8279da0ede562387a066d04
---
M src/osmo_ss7.c
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/65/2365/2
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index ffe587c..cdaa770 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1301,7 +1301,6 @@
switch (notif->sn_header.sn_type) {
case SCTP_SHUTDOWN_EVENT:
osmo_stream_srv_destroy(conn);
- osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_SCTP_COMM_DOWN_IND, asp);
break;
case SCTP_ASSOC_CHANGE:
if (notif->sn_assoc_change.sac_state == SCTP_RESTART)
@@ -1365,7 +1364,7 @@
struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(cli);
osmo_stream_cli_close(cli);
-
+ osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_SCTP_COMM_DOWN_IND, asp);
/* send M-SCTP_RELEASE.ind to XUA Layer Manager */
xua_asp_send_xlm_prim_simple(asp, OSMO_XLM_PRIM_M_SCTP_RELEASE, PRIM_OP_INDICATION);
}
@@ -1393,12 +1392,12 @@
/* more data needed */
return 0;
}
- osmo_stream_cli_reconnect(conn);
+ xua_cli_close_and_reconnect(conn);
return rc;
}
if (osmo_ipa_process_msg(msg) < 0) {
LOGPASP(asp, DLSS7, LOGL_ERROR, "Bad IPA message\n");
- osmo_stream_cli_reconnect(conn);
+ xua_cli_close_and_reconnect(conn);
msgb_free(msg);
return -1;
}
@@ -1440,7 +1439,6 @@
switch (notif->sn_header.sn_type) {
case SCTP_SHUTDOWN_EVENT:
- osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_SCTP_COMM_DOWN_IND, asp);
xua_cli_close_and_reconnect(conn);
break;
case SCTP_ASSOC_CHANGE:
--
To view, visit https://gerrit.osmocom.org/2365
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6859b8549c8cbbe2e8279da0ede562387a066d04
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>