diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-05-07 12:43:28 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-05-17 20:13:52 +0000 |
commit | 0b103999371e91c979ffe51723579860cbbcac2f (patch) | |
tree | 58bbfb371c481289b9c120d0893ecb3e0b6d455f /src/osmo-bsc/osmo_bsc_sigtran.c | |
parent | e5a9665c009f9b81bbc370480405cb91cbe99b66 (diff) |
a_reset: cleanup + remove dead code
The function a_reset_free() is not used anywhere at the code. The
reason for this is that a BSC instance is never cleared once it
is started up. Also the timer number is not according to the spec.
- Remove a_reset_free()
- Fix timer identification number (T4)
- use fi->priv to hold context info
- Fix sourcecode formatting
Change-Id: I72095d52304c520e383755eee6c889bce492cbd4
Related: OS#3102
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_sigtran.c')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_sigtran.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 1a31a7c52..e3d48298d 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -205,7 +205,7 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu) /* Incoming data is a sign of a vital connection */ conn = get_bsc_conn_by_conn_id(scu_prim->u.data.conn_id); if (conn) { - a_reset_conn_success(conn->sccp.msc->a.reset); + a_reset_conn_success(conn->sccp.msc->a.reset_fsm); handle_data_from_msc(conn, oph->msg); } break; @@ -249,7 +249,7 @@ enum bsc_con osmo_bsc_sigtran_new_conn(struct gsm_subscriber_connection *conn, s LOGP(DMSC, LOGL_NOTICE, "Initializing resources for new SIGTRAN connection to MSC: %s...\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr)); - if (a_reset_conn_ready(msc->a.reset) == false) { + if (a_reset_conn_ready(msc->a.reset_fsm) == false) { LOGP(DMSC, LOGL_ERROR, "MSC is not connected. Dropping.\n"); return BSC_CON_REJECT_NO_LINK; } @@ -279,7 +279,7 @@ int osmo_bsc_sigtran_open_conn(struct gsm_subscriber_connection *conn, struct ms msc = conn->sccp.msc; - if (a_reset_conn_ready(msc->a.reset) == false) { + if (a_reset_conn_ready(msc->a.reset_fsm) == false) { LOGP(DMSC, LOGL_ERROR, "MSC is not connected. Dropping.\n"); return -EINVAL; } @@ -333,7 +333,7 @@ int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb *m } else LOGP(DMSC, LOGL_ERROR, "Tx MSC (message too short)\n"); - if (a_reset_conn_ready(msc->a.reset) == false) { + if (a_reset_conn_ready(msc->a.reset_fsm) == false) { LOGP(DMSC, LOGL_ERROR, "MSC is not connected. Dropping.\n"); return -EINVAL; } @@ -487,8 +487,8 @@ int osmo_bsc_sigtran_init(struct llist_head *mscs) return -EINVAL; /* Start MSC-Reset procedure */ - msc->a.reset = a_reset_alloc(msc, msc_name, osmo_bsc_sigtran_reset_cb, msc); - if (!msc->a.reset) + msc->a.reset_fsm = a_reset_alloc(msc, msc_name, osmo_bsc_sigtran_reset_cb, msc); + if (!msc->a.reset_fsm) return -EINVAL; /* If we have detected that the SS7 configuration of the MSC we have just initalized |