diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-10 02:12:32 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-16 15:32:34 +0100 |
commit | 525a8ac9d7e78fea1b03a0f9687b83dd63d33c7c (patch) | |
tree | 68f36606945f30b84fe06b144c9f406229aa1ded /openbsc/src/libmsc/osmo_msc.c | |
parent | 78fc746b10755a645d8d1b52bdcca88fa492f32c (diff) |
mostly cosmetic: have one msc_conn_close() with cause argument
Change-Id: Ied7663f856cfce6e7ed1c0314fd558af85091dcc
Diffstat (limited to 'openbsc/src/libmsc/osmo_msc.c')
-rw-r--r-- | openbsc/src/libmsc/osmo_msc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 644c55c1c..1267a6e76 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -241,7 +241,11 @@ struct bsc_api *msc_bsc_api() { return &msc_handler; } -void msc_close_connection(struct gsm_subscriber_connection *conn) +/* Signal the connection's FSM to gracefully terminate the connection by a + * SUBSCR_CONN_E_CN_CLOSE event. + * \param cause a GSM_CAUSE_* constant, e.g. GSM_CAUSE_AUTH_FAILED. + */ +void msc_conn_close(struct gsm_subscriber_connection *conn, uint32_t cause) { if (!conn) return; @@ -251,7 +255,7 @@ void msc_close_connection(struct gsm_subscriber_connection *conn) return; if (conn->conn_fsm->state == SUBSCR_CONN_S_RELEASED) return; - osmo_fsm_inst_dispatch(conn->conn_fsm, SUBSCR_CONN_E_CN_CLOSE, NULL); + osmo_fsm_inst_dispatch(conn->conn_fsm, SUBSCR_CONN_E_CN_CLOSE, &cause); } /* increment the ref-count. Needs to be called by every user */ |