From 8e2a0ee8e275686d3cc11ee00dbffa64380953c5 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 10 Sep 2019 18:28:49 +0200 Subject: iu_client: allow to control the notifications The iu_client is informing the library user about global event. In prepration to the tx_iu_release_free() call allow to disable upstream notificatiosn Change-Id: Ic93ef6fd54c995405e9c37a5e0c53f81a89850b7 --- TODO-RELEASE | 1 + include/osmocom/ranap/iu_client.h | 1 + src/iu_client.c | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..41d04bc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libranap iu_client.h struct ranap_ue_conn_ctx: add field notification diff --git a/include/osmocom/ranap/iu_client.h b/include/osmocom/ranap/iu_client.h index 0cb84da..b388529 100644 --- a/include/osmocom/ranap/iu_client.h +++ b/include/osmocom/ranap/iu_client.h @@ -30,6 +30,7 @@ struct ranap_ue_conn_ctx { int integrity_active; struct gprs_ra_id ra_id; enum ranap_nsap_addr_enc rab_assign_addr_enc; + bool notification; /* send notification to the upstream user */ }; enum ranap_iu_event_type { diff --git a/src/iu_client.c b/src/iu_client.c index ec5290f..38c8a1d 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -116,6 +116,9 @@ static int global_iu_event(struct ranap_ue_conn_ctx *ue_ctx, if (!global_iu_event_cb) return 0; + if (!ue_ctx->notification) + return 0; + return global_iu_event_cb(ue_ctx, type, data); } @@ -125,6 +128,7 @@ static struct ranap_ue_conn_ctx *ue_conn_ctx_alloc(struct ranap_iu_rnc *rnc, uin ctx->rnc = rnc; ctx->conn_id = conn_id; + ctx->notification = true; llist_add(&ctx->list, &ue_conn_ctx_list); return ctx; -- cgit v1.2.3