Commit 133c9190 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'periodic_registration_update' into 'develop'

periodic_registration_update

See merge request oai/cn5g/oai-cn5g-amf!70
parents f9ffb813 52eafd19
......@@ -191,6 +191,16 @@ std::shared_ptr<ue_context> amf_app::ran_amf_id_2_ue_context(
return ue_ctx_key.at(ue_context_key);
}
bool amf_app::ran_amf_id_2_ue_context(
const std::string& ue_context_key, std::shared_ptr<ue_context>& uc) const {
std::shared_lock lock(m_ue_ctx_key);
if (ue_ctx_key.count(ue_context_key) > 0) {
uc = ue_ctx_key.at(ue_context_key);
if (uc.get() == nullptr) return false;
return true;
} else
return false;
}
//------------------------------------------------------------------------------
void amf_app::set_ran_amf_id_2_ue_context(
const string& ue_context_key, std::shared_ptr<ue_context> uc) {
......
......@@ -91,6 +91,10 @@ class amf_app {
bool is_ran_amf_id_2_ue_context(const std::string& ue_context_key) const;
std::shared_ptr<ue_context> ran_amf_id_2_ue_context(
const std::string& ue_context_key) const;
bool ran_amf_id_2_ue_context(
const std::string& ue_context_key, std::shared_ptr<ue_context>& uc) const;
void set_ran_amf_id_2_ue_context(
const std::string& ue_context_key, std::shared_ptr<ue_context> uc);
......
This diff is collapsed.
......@@ -46,6 +46,7 @@
#include "pdu_session_context.hpp"
#include "amf_event.hpp"
#include "RegistrationAccept.hpp"
#include "ue_context.hpp"
namespace amf_application {
......@@ -170,6 +171,13 @@ class amf_n1 {
void initialize_registration_accept(
std::unique_ptr<nas::RegistrationAccept>& registration_accept);
bool find_ue_context(
const std::shared_ptr<nas_context>& nc, std::shared_ptr<ue_context>& uc);
bool find_ue_context(
uint32_t ran_ue_ngap_id, long amf_ue_ngap_id,
std::shared_ptr<ue_context>& uc);
private:
void ue_initiate_de_registration_handle(
uint32_t ran_ue_ngap_id, long amf_ue_ngap_id, bstring nas);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment