Commit 233004be authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup

parent 02426169
...@@ -352,7 +352,7 @@ void smf_pdu_session::set_seid(const uint64_t& s) { ...@@ -352,7 +352,7 @@ void smf_pdu_session::set_seid(const uint64_t& s) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// TODO check if urr_id should be uniq in the UPF or in the context of a pdn // TODO check if urr_id should be unique in the UPF or in the context of a pdn
// connection // connection
void smf_pdu_session::generate_urr_id(pfcp::urr_id_t& urr_id) { void smf_pdu_session::generate_urr_id(pfcp::urr_id_t& urr_id) {
urr_id.urr_id = urr_id_generator.get_uid(); urr_id.urr_id = urr_id_generator.get_uid();
...@@ -376,14 +376,14 @@ void smf_pdu_session::release_far_id(const pfcp::far_id_t& far_id) { ...@@ -376,14 +376,14 @@ void smf_pdu_session::release_far_id(const pfcp::far_id_t& far_id) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// TODO check if prd_id should be uniq in the UPF or in the context of a pdn // TODO check if prd_id should be unique in the UPF or in the context of a pdn
// connection // connection
void smf_pdu_session::generate_pdr_id(pfcp::pdr_id_t& pdr_id) { void smf_pdu_session::generate_pdr_id(pfcp::pdr_id_t& pdr_id) {
pdr_id.rule_id = pdr_id_generator.get_uid(); pdr_id.rule_id = pdr_id_generator.get_uid();
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// TODO check if prd_id should be uniq in the UPF or in the context of a pdn // TODO check if prd_id should be unique in the UPF or in the context of a pdn
// connection // connection
void smf_pdu_session::release_pdr_id(const pfcp::pdr_id_t& pdr_id) { void smf_pdu_session::release_pdr_id(const pfcp::pdr_id_t& pdr_id) {
pdr_id_generator.free_uid(pdr_id.rule_id); pdr_id_generator.free_uid(pdr_id.rule_id);
...@@ -829,15 +829,12 @@ void smf_context::handle_itti_msg( ...@@ -829,15 +829,12 @@ void smf_context::handle_itti_msg(
std::string supi_prefix = {}; std::string supi_prefix = {};
get_supi_prefix(supi_prefix); get_supi_prefix(supi_prefix);
std::string supi_str = supi_prefix + "-" + smf_supi_to_string(supi); std::string supi_str = supi_prefix + "-" + smf_supi_to_string(supi);
std::string url = std::string url = "http://" + get_amf_addr() +
// std::string(inet_ntoa( NAMF_COMMUNICATION_BASE +
// *((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + smf_cfg.amf_addr.api_version +
//":" + std::to_string(smf_cfg.amf_addr.port) + fmt::format(
"http://" + get_amf_addr() + NAMF_COMMUNICATION_BASE + NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
smf_cfg.amf_addr.api_version + supi_str.c_str());
fmt::format(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
supi_str.c_str());
session_report_msg.set_amf_url(url); session_report_msg.set_amf_url(url);
// seid and trxn_id to be used in Failure indication // seid and trxn_id to be used in Failure indication
session_report_msg.set_seid(req->seid); session_report_msg.set_seid(req->seid);
......
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