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

Fix issue for DNN/NSSAI

parent cc3823ae
......@@ -79,18 +79,25 @@ void SessionManagementSubscriptionDataApi::query_sm_data_handler(
// Getting the query params
auto singleNssaiQuery = request.query().get("single-nssai");
Logger::udr_server().debug("singleNssaiQuery: %s",
singleNssaiQuery.get().c_str());
Pistache::Optional<Snssai> singleNssai;
if (!singleNssaiQuery.isEmpty()) {
Snssai valueQuery_instance;
if (fromStringValue(singleNssaiQuery.get(), valueQuery_instance)) {
Logger::udr_server().debug("SNSSAI SST %d, SD %s",
valueQuery_instance.getSst(),
valueQuery_instance.getSd().c_str());
singleNssai = Pistache::Some(valueQuery_instance);
}
}
auto dnnQuery = request.query().get("dnn");
Pistache::Optional<std::string> dnn;
if (!dnnQuery.isEmpty()) {
Logger::udr_server().debug("dnnQuery: %s", dnnQuery.get().c_str());
std::string valueQuery_instance;
if (fromStringValue(dnnQuery.get(), valueQuery_instance)) {
Logger::udr_server().debug("DNN: %s", valueQuery_instance.c_str());
dnn = Pistache::Some(valueQuery_instance);
}
}
......
......@@ -44,7 +44,8 @@ SessionManagementSubscriptionDataApiImpl::
SessionManagementSubscriptionDataApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
std::string address)
: SessionManagementSubscriptionDataApi(rtr), m_udr_app(udr_app_inst),
: SessionManagementSubscriptionDataApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void SessionManagementSubscriptionDataApiImpl::query_sm_data(
......@@ -69,10 +70,11 @@ void SessionManagementSubscriptionDataApiImpl::query_sm_data(
// TODO: DNN and SNSSAI
nlohmann::json response_data = {};
Pistache::Http::Code code = {};
m_udr_app->handle_query_sm_data(ueId, servingPlmnId, response_data, code);
m_udr_app->handle_query_sm_data(ueId, servingPlmnId, response_data, code,
snssai, dnn_str);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
response.send(code, response_data.dump().c_str());
}
} // namespace oai::udr::api
} // namespace oai::udr::api
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