Change in osmo-bsc[master]: gscon_bssmap_clear(): guard against NULL msc

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Oct 7 10:19:58 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20339 )

Change subject: gscon_bssmap_clear(): guard against NULL msc
......................................................................

gscon_bssmap_clear(): guard against NULL msc

Change-Id: I95b16cebb6ff78649f72a09b5d6c7c7e403233fa
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 63e54ba..6bfada3 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -146,12 +146,18 @@
 		return;
 	}
 
+	if (!conn->sccp.msc) {
+		LOGPFSML(conn->fi, LOGL_ERROR, "Unable to deliver BSSMAP Clear Request message, no MSC for this conn\n");
+		return;
+	}
+
 	LOGPFSML(conn->fi, LOGL_DEBUG, "Tx BSSMAP CLEAR REQUEST(%s) to MSC\n", gsm0808_cause_name(cause));
 	resp = gsm0808_create_clear_rqst(cause);
 	if (!resp) {
 		LOGPFSML(conn->fi, LOGL_ERROR, "Unable to compose BSSMAP Clear Request message\n");
 		return;
 	}
+
 	rate_ctr_inc(&conn->sccp.msc->msc_ctrs->ctr[MSC_CTR_BSSMAP_TX_DT1_CLEAR_RQST]);
 	rc = osmo_bsc_sigtran_send(conn, resp);
 	if (rc < 0)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20339
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I95b16cebb6ff78649f72a09b5d6c7c7e403233fa
Gerrit-Change-Number: 20339
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: Vadim Yanitskiy <vyanitskiy at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201007/4e32a4ac/attachment.htm>


More information about the gerrit-log mailing list