diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-09-11 23:36:30 +0000 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-07 10:19:58 +0000 |
commit | c065ea01d1d1d7fc2d63ab5f97a3d9c14508e7ff (patch) | |
tree | 8cf2ba39e4036d4e7d840f1f70c969a17aeda59d /src/osmo-bsc/bsc_subscr_conn_fsm.c | |
parent | c58a384c75fbe3b5d2c73e212e96a605a5ee1221 (diff) |
gscon_bssmap_clear(): guard against NULL msc
Change-Id: I95b16cebb6ff78649f72a09b5d6c7c7e403233fa
Diffstat (limited to 'src/osmo-bsc/bsc_subscr_conn_fsm.c')
-rw-r--r-- | src/osmo-bsc/bsc_subscr_conn_fsm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 63e54ba38..6bfada38d 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -146,12 +146,18 @@ static void gscon_bssmap_clear(struct gsm_subscriber_connection *conn, 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) |