Commit ab969441 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for NSSAI

parent 48953689
...@@ -4027,8 +4027,9 @@ bool amf_n1::get_slice_selection_subscription_data_from_conf_file( ...@@ -4027,8 +4027,9 @@ bool amf_n1::get_slice_selection_subscription_data_from_conf_file(
gc = amf_n2_inst->assoc_id_2_gnb_context(unc.get()->gnb_assoc_id); gc = amf_n2_inst->assoc_id_2_gnb_context(unc.get()->gnb_assoc_id);
// Find the common NSSAIs between Requested NSSAIs and Subscribed NSSAIs // Find the common NSSAIs between Requested NSSAIs and Subscribed NSSAIs
std::vector<oai::amf::model::Snssai> common_snssais = std::vector<oai::amf::model::Snssai> common_snssais;
nssai.getDefaultSingleNssais();
// nssai.getDefaultSingleNssais();
for (auto ta : gc->s_ta_list) { for (auto ta : gc->s_ta_list) {
for (auto p : ta.b_plmn_list) { for (auto p : ta.b_plmn_list) {
...@@ -4050,10 +4051,12 @@ bool amf_n1::get_slice_selection_subscription_data_from_conf_file( ...@@ -4050,10 +4051,12 @@ bool amf_n1::get_slice_selection_subscription_data_from_conf_file(
} }
} }
nssai.setDefaultSingleNssais(common_snssais);
// Print out the list of subscribed NSSAIs // Print out the list of subscribed NSSAIs
for (auto n : nssai.getDefaultSingleNssais()) { for (auto n : nssai.getDefaultSingleNssais()) {
Logger::amf_n1().debug( Logger::amf_n1().debug(
"S-NSSAI (SST %d, SD %s)", n.getSst(), n.getSd().c_str()); "Default Single NSSAIs: S-NSSAI (SST %d, SD %s)", n.getSst(), n.getSd().c_str());
} }
return true; return true;
......
...@@ -85,6 +85,9 @@ void Nssai::unsetSupportedFeatures() { ...@@ -85,6 +85,9 @@ void Nssai::unsetSupportedFeatures() {
std::vector<Snssai>& Nssai::getDefaultSingleNssais() { std::vector<Snssai>& Nssai::getDefaultSingleNssais() {
return m_DefaultSingleNssais; return m_DefaultSingleNssais;
} }
void Nssai::setDefaultSingleNssais(std::vector<Snssai>& snssais) {
m_DefaultSingleNssais = snssais;
}
std::vector<Snssai>& Nssai::getSingleNssais() { std::vector<Snssai>& Nssai::getSingleNssais() {
return m_SingleNssais; return m_SingleNssais;
} }
......
...@@ -75,6 +75,7 @@ class Nssai { ...@@ -75,6 +75,7 @@ class Nssai {
/// ///
/// </summary> /// </summary>
std::vector<Snssai>& getDefaultSingleNssais(); std::vector<Snssai>& getDefaultSingleNssais();
void setDefaultSingleNssais(std::vector<Snssai>& snssais);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
......
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