This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/23742 ) Change subject: ranap_iu_tx_release_free(): always trigger RANAP_IU_EVENT_IU_RELEASE as a result ...................................................................... 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 --- M include/osmocom/ranap/iu_client.h M src/iu_client.c 2 files changed, 13 insertions(+), 8 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ranap/iu_client.h b/include/osmocom/ranap/iu_client.h index 24a5af9..2e72839 100644 --- a/include/osmocom/ranap/iu_client.h +++ b/include/osmocom/ranap/iu_client.h @@ -75,9 +75,9 @@ int ranap_iu_tx_common_id(struct ranap_ue_conn_ctx *ue_ctx, const char *imsi); int ranap_iu_tx_release(struct ranap_ue_conn_ctx *ctx, const struct RANAP_Cause *cause); -/* transmit a Iu Release Command and free the ctx afterwards. - * If a Release Complete is not received within timeout s, - * release the SCCP connection. */ +/* Transmit a Iu Release Command and submit event RANAP_IU_EVENT_IU_RELEASE upon + * Release Complete or timeout. Caller is responsible to free the context and + * closing the SCCP connection (ranap_iu_free_ue) upon recieval of the event. */ void ranap_iu_tx_release_free(struct ranap_ue_conn_ctx *ctx, const struct RANAP_Cause *cause, int timeout); 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 @@ 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 @@ 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 @@ 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); } -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/23742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Iac822c74e56750dc40e94573eae0e20853ff68c0 Gerrit-Change-Number: 23742 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210415/f4ed2178/attachment.htm>