aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/osmo-bsc/gsm_04_08_rr.c7
-rw-r--r--tests/gsm0408/gsm0408_test.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 4659c1ac9..0f72ab794 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -927,6 +927,7 @@ static void dispatch_dtap(struct gsm_subscriber_connection *conn,
int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
{
struct gsm_lchan *lchan;
+ int rc;
lchan = msg->lchan;
if (!lchan_may_receive_data(lchan)) {
@@ -948,7 +949,11 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
lchan->conn->lchan = lchan;
/* fwd via bsc_api to send COMPLETE L3 INFO to MSC */
- bsc_compl_l3(lchan->conn, msg, 0);
+ rc = bsc_compl_l3(lchan->conn, msg, 0);
+ if (rc < 0) {
+ gscon_release_lchans(lchan->conn, false);
+ return -1;
+ }
/* conn shall release lchan on teardown, also if this Layer 3 Complete is rejected. */
}
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index faeca39fa..8906e5b9b 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -952,6 +952,10 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *ne
OSMO_ASSERT(0);
}
+void gscon_release_lchans(struct gsm_subscriber_connection *conn, bool do_sacch_deact) {
+ OSMO_ASSERT(0);
+}
+
bool on_gsm_ts_init(struct gsm_bts_trx_ts *ts)
{
return true;