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: a_iface: If L3/DTAP returns error in COMPL L3, close SCCP connection
......................................................................
a_iface: If L3/DTAP returns error in COMPL L3, close SCCP connection
It's pretty amazing that we print error messages anrd return error
codes, but nobody ever looks at the error code and/or closes the
connection. Let's change that.
Change-Id: Iec693d8012a7816d1ded8206c2d979ac0546fb6e
---
M src/libmsc/a_iface.c
1 file changed, 12 insertions(+), 2 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index fa8c5c3..2b1baf0 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -535,9 +535,19 @@
LOGP(DBSSAP, LOGL_DEBUG, "N-CONNECT.ind(%u, %s)\n",
scu_prim->u.connect.conn_id, msgb_hexdump_l2(oph->msg));
rc = a_sccp_rx_dt(scu, &a_conn_info, oph->msg);
- } else
+ } else {
LOGP(DBSSAP, LOGL_DEBUG, "N-CONNECT.ind(%u)\n", scu_prim->u.connect.conn_id);
- record_bsc_con(scu, a_conn_info.bsc, scu_prim->u.connect.conn_id);
+ rc = -ENODATA;
+ }
+
+ if (rc < 0) {
+ /* initial message (COMPL L3) caused some error, we didn't allocate
+ * a subscriber_conn and must close the connection again */
+ rc = osmo_sccp_tx_disconn(scu, a_conn_info.conn_id,
+ &a_conn_info.bsc->msc_addr,
+ SCCP_RETURN_CAUSE_UNQUALIFIED);
+ } else
+ record_bsc_con(scu, a_conn_info.bsc, scu_prim->u.connect.conn_id);
}
break;
--
To view, visit https://gerrit.osmocom.org/7374
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iec693d8012a7816d1ded8206c2d979ac0546fb6e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder