From 15d3cc54bd3ea5549fc2d30f5927a05e3bea2627 Mon Sep 17 00:00:00 2001 From: Piotr Gawlowicz Date: Wed, 22 Mar 2023 16:02:45 +0100 Subject: [PATCH] e2ap: change generate_subscription_delete_response signature --- srsgnb/hdr/stack/ric/e2ap.h | 3 +-- srsgnb/src/stack/ric/e2ap.cc | 10 ++++------ srsgnb/src/stack/ric/ric_subscription.cc | 7 +++++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/srsgnb/hdr/stack/ric/e2ap.h b/srsgnb/hdr/stack/ric/e2ap.h index 5949a9097..de66d9516 100644 --- a/srsgnb/hdr/stack/ric/e2ap.h +++ b/srsgnb/hdr/stack/ric/e2ap.h @@ -57,8 +57,7 @@ public: int process_subscription_request(ricsubscription_request_s subscription_request); e2_ap_pdu_c generate_subscription_response(ric_subscription_reponse_t ric_subscription_reponse); e2_ap_pdu_c generate_subscription_failure(ric_subscription_reponse_t ric_subscription_reponse); - e2_ap_pdu_c - generate_subscription_delete_response(uint32_t ric_requestor_id, uint32_t ric_instance_id, uint32_t ra_nfunction_id); + e2_ap_pdu_c generate_subscription_delete_response(ric_subscription_reponse_t ric_subscription_reponse); e2_ap_pdu_c generate_indication(ric_indication_t& ric_indication); e2_ap_pdu_c generate_reset_request(); e2_ap_pdu_c generate_reset_response(); diff --git a/srsgnb/src/stack/ric/e2ap.cc b/srsgnb/src/stack/ric/e2ap.cc index 667d365c5..426280666 100644 --- a/srsgnb/src/stack/ric/e2ap.cc +++ b/srsgnb/src/stack/ric/e2ap.cc @@ -135,9 +135,7 @@ e2_ap_pdu_c e2ap::generate_subscription_failure(ric_subscription_reponse_t ric_s return pdu; } -e2_ap_pdu_c e2ap::generate_subscription_delete_response(uint32_t ric_requestor_id, - uint32_t ric_instance_id, - uint32_t ra_nfunction_id) +e2_ap_pdu_c e2ap::generate_subscription_delete_response(ric_subscription_reponse_t ric_subscription_reponse) { e2_ap_pdu_c pdu; successful_outcome_s& success = pdu.set_successful_outcome(); @@ -146,11 +144,11 @@ e2_ap_pdu_c e2ap::generate_subscription_delete_response(uint32_t ric_requestor_i ricsubscription_delete_resp_s& sub_resp = success.value.ricsubscription_delete_resp(); sub_resp->ri_crequest_id.crit = asn1::crit_opts::reject; - sub_resp->ri_crequest_id->ric_requestor_id = ric_requestor_id; - sub_resp->ri_crequest_id->ric_instance_id = ric_instance_id; + sub_resp->ri_crequest_id->ric_requestor_id = ric_subscription_reponse.ric_requestor_id; + sub_resp->ri_crequest_id->ric_instance_id = ric_subscription_reponse.ric_instance_id; sub_resp->ra_nfunction_id.crit = asn1::crit_opts::reject; - sub_resp->ra_nfunction_id->value = ra_nfunction_id; + sub_resp->ra_nfunction_id->value = ric_subscription_reponse.ra_nfunction_id; return pdu; } diff --git a/srsgnb/src/stack/ric/ric_subscription.cc b/srsgnb/src/stack/ric/ric_subscription.cc index 7d1a2ad5f..e95e78b22 100644 --- a/srsgnb/src/stack/ric/ric_subscription.cc +++ b/srsgnb/src/stack/ric/ric_subscription.cc @@ -135,8 +135,11 @@ void ric_client::ric_subscription::delete_subscription() } parent->logger.debug("Send RIC Subscription Delete Response to RIC Requestor ID: %i\n", ric_requestor_id); - e2_ap_pdu_c send_pdu = - parent->e2ap_.generate_subscription_delete_response(ric_requestor_id, ric_instance_id, ra_nfunction_id); + ric_subscription_reponse_t ric_subscription_reponse; + ric_subscription_reponse.ric_requestor_id = ric_requestor_id; + ric_subscription_reponse.ric_instance_id = ric_instance_id; + ric_subscription_reponse.ra_nfunction_id = ra_nfunction_id; + e2_ap_pdu_c send_pdu = parent->e2ap_.generate_subscription_delete_response(ric_subscription_reponse); parent->queue_send_e2ap_pdu(send_pdu); }