Commit b2f4addd authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Fix issue for Static UE IP Addr

parent 994b898e
...@@ -911,6 +911,11 @@ bool smf_sbi::get_sm_data( ...@@ -911,6 +911,11 @@ bool smf_sbi::get_sm_data(
// Process the response // Process the response
if (!jsonData.empty()) { if (!jsonData.empty()) {
if (jsonData.type() == json::value_t::array) {
if (!jsonData[0].empty())
jsonData = jsonData[0]; // Array with only 1 member!
}
Logger::smf_sbi().debug("Response from UDM %s", jsonData.dump().c_str()); Logger::smf_sbi().debug("Response from UDM %s", jsonData.dump().c_str());
// Verify SNSSAI // Verify SNSSAI
if (jsonData.find("singleNssai") == jsonData.end()) return false; if (jsonData.find("singleNssai") == jsonData.end()) return false;
...@@ -930,6 +935,9 @@ bool smf_sbi::get_sm_data( ...@@ -930,6 +935,9 @@ bool smf_sbi::get_sm_data(
} }
} }
// Verify DNN configurations
if (jsonData.find("dnnConfigurations") == jsonData.end()) return false;
// Retrieve SessionManagementSubscription and store in the context // Retrieve SessionManagementSubscription and store in the context
for (nlohmann::json::iterator it = jsonData["dnnConfigurations"].begin(); for (nlohmann::json::iterator it = jsonData["dnnConfigurations"].begin();
it != jsonData["dnnConfigurations"].end(); ++it) { it != jsonData["dnnConfigurations"].end(); ++it) {
......
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