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

Code cleanup

parent 73e7a344
......@@ -259,7 +259,6 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
*/
upCnx_state_e get_upCnx_state() const;
// Called by GTPV2-C DELETE_SESSION_REQUEST
// deallocate_ressources is for releasing related-resources prior to the
// deletion of objects since shared_ptr is actually heavy used for handling
// objects, deletion of object instances cannot be always guaranteed when
......
......@@ -282,14 +282,6 @@ bool smf_n1::create_n1_pdu_session_establishment_reject(
EPD_5GS_SESSION_MANAGEMENT_MESSAGES;
sm_msg->header.pdu_session_identity = msg.get_pdu_session_id();
// PDU Session Establishment Reject is included in the following messages:
// 1 - PDU Session Create SM Context Response (PDU Session Establishment
// procedure - reject) 2 - N1N2MessageTransfer Request (PDU Session
// Establishment procedure - reject) 3- PDU Session Update SM Context
// Response (PDU Session Establishment procedure - reject)​
// PDU_SESSION_CREATE_SM_CONTEXT_RESPONSE or
// PDU_SESSION_CREATE_SM_CONTEXT_REQUEST
Logger::smf_n1().info("PDU_SESSION_ESTABLISHMENT_REJECT, encode starting...");
// Fill the content of PDU Session Establishment Reject message
......@@ -298,7 +290,7 @@ bool smf_n1::create_n1_pdu_session_establishment_reject(
msg.get_pti().procedure_transaction_id;
sm_msg->header.message_type = PDU_SESSION_ESTABLISHMENT_REJECT;
Logger::smf_n1().debug(
"NAS header, Extended Protocol Discriminator 0x%x, Security Header "
"NAS header, Extended Protocol Discriminator 0x%x, Security Header "
"Type: 0x%x",
nas_msg.header.extended_protocol_discriminator,
nas_msg.header.security_header_type);
......
......@@ -331,7 +331,6 @@ void session_create_sm_context_procedure::handle_itti_msg(
smf_qos_flow default_qos_flow = {};
// flow_updated info will be used to construct N1,N2 container
qos_flow_context_updated flow_updated = {};
// smf_qos_flow flow = { };
QOSRulesIE qos_rule = {};
flow_updated.set_cause(REQUEST_ACCEPTED);
......
......@@ -76,6 +76,7 @@ void nf_profile::set_nf_type(const std::string& type) {
std::string nf_profile::get_nf_type() const {
return nf_type;
}
//------------------------------------------------------------------------------
void nf_profile::set_nf_status(const std::string& status) {
nf_status = status;
......@@ -150,6 +151,7 @@ void nf_profile::get_nf_snssais(std::vector<snssai_t>& s) const {
void nf_profile::add_snssai(const snssai_t& s) {
snssais.push_back(s);
}
//------------------------------------------------------------------------------
void nf_profile::set_nf_ipv4_addresses(const std::vector<struct in_addr>& a) {
ipv4_addresses = a;
......@@ -159,6 +161,7 @@ void nf_profile::set_nf_ipv4_addresses(const std::vector<struct in_addr>& a) {
void nf_profile::add_nf_ipv4_addresses(const struct in_addr& a) {
ipv4_addresses.push_back(a);
}
//------------------------------------------------------------------------------
void nf_profile::get_nf_ipv4_addresses(std::vector<struct in_addr>& a) const {
a = ipv4_addresses;
......@@ -205,7 +208,6 @@ void nf_profile::to_json(nlohmann::json& data) const {
nlohmann::json tmp = {};
tmp["sst"] = s.sST;
tmp["sd"] = s.sD;
;
data["sNssais"].push_back(tmp);
}
// ipv4_addresses
......@@ -216,8 +218,6 @@ void nf_profile::to_json(nlohmann::json& data) const {
data["priority"] = priority;
data["capacity"] = capacity;
// Logger::smf_app().debug("SMF profile to json:\n %s", data.dump().c_str());
}
//------------------------------------------------------------------------------
......@@ -248,8 +248,6 @@ void nf_profile::from_json(const nlohmann::json& data) {
s.sST = it["sst"].get<int>();
s.sD = it["sd"].get<std::string>();
snssais.push_back(s);
// Logger::smf_app().debug("Added SNSSAI (SST %d, SD %s)", s.sST,
// s.sD.c_str());
}
}
......@@ -266,7 +264,6 @@ void nf_profile::from_json(const nlohmann::json& data) {
Logger::smf_app().warn(
"Address conversion: Bad value %s", util::trim(address).c_str());
}
// Logger::smf_app().debug("\tIPv4 Addr: %s", address.c_str());
add_nf_ipv4_addresses(addr4);
}
}
......
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