Commit 5f499912 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup

parent c9867719
...@@ -1368,9 +1368,9 @@ bool amf_n1::_5g_aka_confirmation_from_ausf( ...@@ -1368,9 +1368,9 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(
Logger::amf_n1().debug("_5g_aka_confirmation_from_ausf"); Logger::amf_n1().debug("_5g_aka_confirmation_from_ausf");
std::string remoteUri = nc.get()->Href; std::string remoteUri = nc.get()->Href;
std::string msgBody; std::string msgBody = {};
std::string Response; std::string response = {};
std::string resStar_string; std::string resStar_string = {};
std::map<std::string, std::string>::iterator iter; std::map<std::string, std::string>::iterator iter;
iter = rand_record.find(nc.get()->imsi); iter = rand_record.find(nc.get()->imsi);
...@@ -1396,12 +1396,12 @@ bool amf_n1::_5g_aka_confirmation_from_ausf( ...@@ -1396,12 +1396,12 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(
msgBody = confirmationdata_j.dump(); msgBody = confirmationdata_j.dump();
// TODO: Should be updated // TODO: Should be updated
amf_n11_inst->curl_http_client(remoteUri, "PUT", msgBody, Response); amf_n11_inst->curl_http_client(remoteUri, "PUT", msgBody, response);
free_wrapper((void**) &resStar_s); free_wrapper((void**) &resStar_s);
try { try {
ConfirmationDataResponse confirmationdataresponse; ConfirmationDataResponse confirmationdataresponse;
nlohmann::json::parse(Response.c_str()).get_to(confirmationdataresponse); nlohmann::json::parse(response.c_str()).get_to(confirmationdataresponse);
unsigned char* kseaf_hex = unsigned char* kseaf_hex =
format_string_as_hex(confirmationdataresponse.getKseaf()); format_string_as_hex(confirmationdataresponse.getKseaf());
memcpy(nc.get()->_5g_av[0].kseaf, kseaf_hex, 32); memcpy(nc.get()->_5g_av[0].kseaf, kseaf_hex, 32);
......
This diff is collapsed.
...@@ -71,7 +71,7 @@ class amf_n11 { ...@@ -71,7 +71,7 @@ class amf_n11 {
void curl_http_client( void curl_http_client(
std::string remoteUri, std::string Method, std::string msgBody, std::string remoteUri, std::string Method, std::string msgBody,
std::string& Response); std::string& response);
bool discover_smf( bool discover_smf(
std::string& smf_addr, std::string& smf_api_version, std::string& smf_addr, std::string& smf_api_version,
......
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