From 6e85882551cc8e81e75b4d0ab09d7678309e1055 Mon Sep 17 00:00:00 2001 From: Piotr Gawlowicz Date: Wed, 22 Mar 2023 18:06:56 +0100 Subject: [PATCH] e2ap: remove subscription if no action admitted --- srsgnb/src/stack/ric/ric_subscription.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srsgnb/src/stack/ric/ric_subscription.cc b/srsgnb/src/stack/ric/ric_subscription.cc index 1eeb1dd81..09cb2ac46 100644 --- a/srsgnb/src/stack/ric/ric_subscription.cc +++ b/srsgnb/src/stack/ric/ric_subscription.cc @@ -78,6 +78,13 @@ ric_client::ric_subscription::ric_subscription(ric_client* ric_cli not_admitted_actions.push_back(action_item.ric_action_id); } } + + if (admitted_actions.size() == 0) { + parent->logger.debug("No Action admitted -> remove subscription for RAN function id: %i", ra_nfunction_id); + printf("No Action admitted -> remove subscription for RAN function id: %i\n", ra_nfunction_id); + return; + } + initialized = true; }