Commit 30cf53be authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for AMF Addr

parent 7a5b83ea
......@@ -88,7 +88,7 @@ class smf_context_ref {
dnn = "";
pdu_session_id = 0;
amf_status_uri = "";
amf_addr = "";
amf_addr = "";
}
supi_t supi;
......
......@@ -774,11 +774,11 @@ void smf_context::handle_itti_msg(
get_supi_prefix(supi_prefix);
std::string supi_str = supi_prefix + "-" + smf_supi_to_string(supi);
std::string url =
//std::string(inet_ntoa(
// std::string(inet_ntoa(
// *((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) +
sp.get()->get_amf_addr() +
NAMF_COMMUNICATION_BASE + smf_cfg.amf_addr.api_version +
sp.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
smf_cfg.amf_addr.api_version +
fmt::format(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
supi_str.c_str());
......@@ -1560,10 +1560,11 @@ void smf_context::handle_pdu_session_create_sm_context_request(
supi_str = sm_context_resp_pending->res.get_supi_prefix() + "-" +
smf_supi_to_string(supi);
std::string url =
// std::string(
// std::string(
// inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
// ":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE +
sp.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
// ":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE
// +
sp.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
smf_cfg.amf_addr.api_version +
fmt::format(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, supi_str.c_str());
......@@ -2758,9 +2759,10 @@ void smf_context::handle_pdu_session_modification_network_requested(
std::string supi_str =
itti_msg->msg.get_supi_prefix() + "-" + smf_supi_to_string(supi);
std::string url =
//std::string(inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
// std::string(inet_ntoa(*((struct in_addr*)
// &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE +
sp.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
sp.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
smf_cfg.amf_addr.api_version +
fmt::format(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, supi_str.c_str());
......
......@@ -1054,7 +1054,7 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
std::string supi_prefix;
scid_t scid; // SM Context ID
//AMF IP addr
// AMF IP addr
string amf_addr;
// Big recursive lock
mutable std::recursive_mutex m_context;
......
......@@ -419,9 +419,10 @@ void session_create_sm_context_procedure::handle_itti_msg(
std::string supi_str = n11_triggered_pending->res.get_supi_prefix() + "-" +
smf_supi_to_string(supi);
std::string url =
//std::string(inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
// std::string(inet_ntoa(*((struct in_addr*)
// &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE +
sps.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
sps.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
smf_cfg.amf_addr.api_version +
fmt::format(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, supi_str.c_str());
......@@ -454,10 +455,10 @@ void session_create_sm_context_procedure::handle_itti_msg(
// N1N2MsgTxfrFailureNotification
std::string callback_uri =
//std::string(
// std::string(
// inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) + NSMF_PDU_SESSION_BASE +
sps.get()->get_amf_addr() + NSMF_PDU_SESSION_BASE +
sps.get()->get_amf_addr() + NSMF_PDU_SESSION_BASE +
smf_cfg.sbi_api_version +
fmt::format(
NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE, supi_str.c_str());
......
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