diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-12-03 11:00:04 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2019-02-04 13:36:26 +0100 |
commit | 0df904dea9106587f40ec379e9cc05ea251beb7e (patch) | |
tree | 02ccf5ec37b6633677153892dee6b73a1724465f /src/libmsc/ran_conn.c | |
parent | c7de62cc53fa6ad985015403dd9af8f1627136a0 (diff) |
Add SGs Interface
Add an SGs interface (3GPP TS 29.118) to osmo-msc in order to support
SMS tunneling and Circuit Switched Fallback (CSFB)
Change-Id: I73359925fc1ca72b33a1466e6ac41307f2f0b11d
Related: OS#3615
Diffstat (limited to 'src/libmsc/ran_conn.c')
-rw-r--r-- | src/libmsc/ran_conn.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libmsc/ran_conn.c b/src/libmsc/ran_conn.c index 4eefa6df2..6629bf6d1 100644 --- a/src/libmsc/ran_conn.c +++ b/src/libmsc/ran_conn.c @@ -31,6 +31,7 @@ #include <osmocom/msc/transaction.h> #include <osmocom/msc/signal.h> #include <osmocom/msc/a_iface.h> +#include <osmocom/msc/sgs_iface.h> #include <osmocom/msc/iucs.h> #include "../../bscconfig.h" @@ -338,6 +339,13 @@ static void ran_conn_fsm_releasing_onenter(struct osmo_fsm_inst *fi, uint32_t pr { struct ran_conn *conn = fi->priv; + /* The SGs interface needs to access vsub struct members to send the + * release message, however the following release procedures will + * remove conn->vsub, so we need to send the release right now. */ + if (conn->via_ran == OSMO_RAT_EUTRAN_SGS) { + sgs_iface_tx_release(conn); + } + /* Use count for either conn->a.waiting_for_clear_complete or * conn->iu.waiting_for_release_complete. 'get' it early, so we don't deallocate after tearing * down active transactions. Safeguard against double-get (though it shouldn't happen). */ @@ -381,6 +389,12 @@ static void ran_conn_fsm_releasing_onenter(struct osmo_fsm_inst *fi, uint32_t pr } conn->iu.waiting_for_release_complete = true; break; + case OSMO_RAT_EUTRAN_SGS: + /* Release message is already sent at the beginning of this + * functions (see above), but we still need to notify the + * conn that a release has been sent / is in progress. */ + ran_conn_sgs_release_sent(conn); + break; default: LOGP(DMM, LOGL_ERROR, "%s: Unknown RAN type, cannot tx release/clear\n", vlr_subscr_name(conn->vsub)); @@ -667,6 +681,8 @@ struct ran_conn *ran_conn_alloc(struct gsm_network *network, case OSMO_RAT_UTRAN_IU: conn->log_subsys = DRANAP; break; + case OSMO_RAT_EUTRAN_SGS: + conn->log_subsys = DSGS; default: conn->log_subsys = DMSC; break; @@ -772,3 +788,11 @@ void ran_conn_rx_iu_release_complete(struct ran_conn *conn) { rx_close_complete(conn, "Iu Release Complete", &conn->iu.waiting_for_release_complete); } + +void ran_conn_sgs_release_sent(struct ran_conn *conn) +{ + bool dummy_waiting_for_release_complete = true; + + /* Note: In SGsAP there is no confirmation of a release. */ + rx_close_complete(conn, "SGs Release Complete", &dummy_waiting_for_release_complete); +} |