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

Merge branch 'ausf' into quectel

parents 12252056 245576c8
...@@ -837,7 +837,7 @@ bool amf_n11::send_ue_authentication_request( ...@@ -837,7 +837,7 @@ bool amf_n11::send_ue_authentication_request(
std::string( std::string(
inet_ntoa(*((struct in_addr*) &amf_cfg.ausf_addr.ipv4_addr))) + inet_ntoa(*((struct in_addr*) &amf_cfg.ausf_addr.ipv4_addr))) +
":" + std::to_string(amf_cfg.ausf_addr.port) + "/nausf-auth/" + ":" + std::to_string(amf_cfg.ausf_addr.port) + "/nausf-auth/" +
amf_cfg.ausf_addr.api_version + "ue-authentications"; amf_cfg.ausf_addr.api_version + "/ue-authentications";
Logger::amf_n11().debug( Logger::amf_n11().debug(
"Send UE Authentication Request to AUSF, URL %s", url.c_str()); "Send UE Authentication Request to AUSF, URL %s", url.c_str());
...@@ -886,10 +886,13 @@ bool amf_n11::send_ue_authentication_request( ...@@ -886,10 +886,13 @@ bool amf_n11::send_ue_authentication_request(
if ((httpCode == 200) or if ((httpCode == 200) or
(httpCode == 201)) { // TODO: remove hardcoded value (httpCode == 201)) { // TODO: remove hardcoded value
try { try {
nlohmann::json::parse(*httpData.get()).get_to(ue_auth_ctx); std::string tmp = *httpData.get();
nlohmann::json::parse(tmp.c_str()).get_to(ue_auth_ctx);
Logger::amf_n11().debug(
"UE Authentication, response from AUSF\n, %s ", tmp.c_str());
} catch (nlohmann::json::exception& e) { } catch (nlohmann::json::exception& e) {
Logger::amf_n11().warn( Logger::amf_n11().warn(
"UE Authentication, could not parse json from the AUSF " "UE Authentication, could not parse Json from the AUSF "
"response"); "response");
// TODO: error handling // TODO: error handling
return false; return false;
......
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