diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2019-08-12 16:48:56 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2019-09-03 18:44:27 +0200 |
commit | 609994d1468af27d0af4427e6b57df580fc80a7a (patch) | |
tree | cfdfb1e9432b3011da48be62442e9c14e7d713e5 /src/iu_client.c | |
parent | 4ae261b89bb05139d72bd7458aa79579a56580cd (diff) |
iu_client: introduce ranap_iu_free_ue() to free the UE connections
When freeing the UE connection object, disconnect the SCCP connection.
Change-Id: I6812edb4da487507ccf9f483de801c1c65c4b72b
Diffstat (limited to 'src/iu_client.c')
-rw-r--r-- | src/iu_client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/iu_client.c b/src/iu_client.c index ce06f8a..c7ed341 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -131,6 +131,16 @@ static struct ranap_ue_conn_ctx *ue_conn_ctx_find(uint32_t conn_id) return NULL; } +void ranap_iu_free_ue(struct ranap_ue_conn_ctx *ue_ctx) +{ + if (!ue_ctx) + return; + + osmo_sccp_tx_disconn(g_scu, ue_ctx->conn_id, NULL, 0); + llist_del(&ue_ctx->list); + talloc_free(ue_ctx); +} + static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); |