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

Fix issue for processing response from AUSF

parent 161a9f7c
......@@ -3702,7 +3702,8 @@ bool amf_n1::reroute_registration_request(std::shared_ptr<nas_context>& nc) {
// re-allocation procedure will be executed to reroute the Registration "
// Request to an appropriate AMF
Logger::amf_n1().debug("Verifying whether this AMF can handle the request");
Logger::amf_n1().debug(
"Verifying whether this AMF can handle the request...");
/*
// Check if the AMF can serve all the requested S-NSSAIs
......@@ -3727,7 +3728,7 @@ bool amf_n1::reroute_registration_request(std::shared_ptr<nas_context>& nc) {
// Check that AMF can process the Requested NSSAIs or not
if (check_subscribed_nssai(nc, nssai)) {
Logger::amf_n1().debug(
"Current AMF can handle the Requested/Subscribed NSSAIs, do not need "
"Current AMF can handle the Requested/Subscribed NSSAIs, no need "
"to perform AMF Re-allocation procedure");
return false;
}
......
......@@ -1747,28 +1747,18 @@ void amf_n11::curl_http_client(
response_json = {};
return;
}
// Get the ProblemDetails
try {
response_json = nlohmann::json::parse(response);
} catch (nlohmann::json::exception& e) {
Logger::amf_n11().info("Could not get JSON content from the response");
response_json = {};
}
}
Logger::amf_n11().debug("Response code %d", httpCode);
return;
try {
response_json = nlohmann::json::parse(response);
} catch (nlohmann::json::exception& e) {
Logger::amf_n11().info("Could not get JSON content from the response");
response_json = {};
}
if (!is_response_ok) {
try {
response_json = nlohmann::json::parse(response);
} catch (nlohmann::json::exception& e) {
Logger::amf_n11().info("Could not get JSON content from the response");
}
Logger::amf_n11().info(
"Get response with Json content: %s", response_json.dump().c_str());
Logger::amf_n11().info(
"Get response with Json content: %s", response_json.dump().c_str());
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
......
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