aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-04-13 19:56:10 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-04-14 17:45:12 +0200
commit7fcd33df8cdaddbb171deed698bd881ebe0b48c9 (patch)
treead3d780a7c725e45d28ac49a166939086e04341e /src
parent68a796ebc51070c299a3dc310059b3c8bcd1344f (diff)
ranap_iu_tx_release_free(): always trigger RANAP_IU_EVENT_IU_RELEASE as a result
This allows the SGSN always having feedback on the resolution of the release, hence being able to stay in PMM CONNECTED state until the resolution is received, then moving to PMM IDLE. Related: SYS#5389 Change-Id: Iac822c74e56750dc40e94573eae0e20853ff68c0
Diffstat (limited to 'src')
-rw-r--r--src/iu_client.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/iu_client.c b/src/iu_client.c
index 06285ec..da433da 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -124,6 +124,12 @@ static int global_iu_event(struct ranap_ue_conn_ctx *ue_ctx,
return global_iu_event_cb(ue_ctx, type, data);
}
+static void ue_conn_ctx_release_timeout_cb(void *ctx_)
+{
+ struct ranap_ue_conn_ctx *ctx = (struct ranap_ue_conn_ctx *)ctx_;
+ global_iu_event(ctx, RANAP_IU_EVENT_IU_RELEASE, NULL);
+}
+
static struct ranap_ue_conn_ctx *ue_conn_ctx_alloc(struct ranap_iu_rnc *rnc, uint32_t conn_id)
{
struct ranap_ue_conn_ctx *ctx = talloc_zero(talloc_iu_ctx, struct ranap_ue_conn_ctx);
@@ -133,7 +139,7 @@ static struct ranap_ue_conn_ctx *ue_conn_ctx_alloc(struct ranap_iu_rnc *rnc, uin
ctx->notification = true;
ctx->free_on_release = false;
osmo_timer_setup(&ctx->release_timeout,
- (void *)(void *) ranap_iu_free_ue,
+ ue_conn_ctx_release_timeout_cb,
ctx);
llist_add(&ctx->list, &ue_conn_ctx_list);
@@ -501,10 +507,9 @@ void ranap_iu_tx_release_free(struct ranap_ue_conn_ctx *ctx,
ctx->notification = false;
ctx->free_on_release = true;
int ret = ranap_iu_tx_release(ctx, cause);
- if (ret) {
- ranap_iu_free_ue(ctx);
- return;
- }
+ /* On Tx failure, trigger timeout immediately, as the response will never arrive */
+ if (ret)
+ timeout = 0;
osmo_timer_schedule(&ctx->release_timeout, timeout, 0);
}