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

Code cleanup

parent 61ae53a0
...@@ -587,12 +587,6 @@ void smf_app::handle_itti_msg( ...@@ -587,12 +587,6 @@ void smf_app::handle_itti_msg(
return; return;
} }
/* itti_n4_session_failure_indication* itti_n4 =
new itti_n4_session_failure_indication(TASK_SMF_APP,
TASK_SMF_N4); itti_n4->seid = m.seid; itti_n4->trxn_id =
m.trxn_id; itti_n4->r_endpoint = endpoint(up_node_id.u1.ipv4_address,
pfcp::default_port);
*/
std::shared_ptr<itti_n4_session_failure_indication> std::shared_ptr<itti_n4_session_failure_indication>
itti_n4_failure_indication = itti_n4_failure_indication =
std::make_shared<itti_n4_session_failure_indication>( std::make_shared<itti_n4_session_failure_indication>(
......
...@@ -770,11 +770,6 @@ void smf_context::handle_itti_msg( ...@@ -770,11 +770,6 @@ void smf_context::handle_itti_msg(
pfcp::qfi_t qfi = {}; pfcp::qfi_t qfi = {};
if (find_pdu_session(pdr_id, qfi, sd, sp)) { if (find_pdu_session(pdr_id, qfi, sd, sp)) {
// Step 1. send N4 Data Report Ack to UPF // Step 1. send N4 Data Report Ack to UPF
/* itti_n4_session_report_response* n4_ser =
new itti_n4_session_report_response(TASK_SMF_APP,
TASK_SMF_N4); n4_ser->seid = req->seid; n4_ser->trxn_id =
req->trxn_id; n4_ser->r_endpoint = req->r_endpoint;
*/
std::shared_ptr<itti_n4_session_report_response> n4_report_ack = std::shared_ptr<itti_n4_session_report_response> n4_report_ack =
std::make_shared<itti_n4_session_report_response>( std::make_shared<itti_n4_session_report_response>(
TASK_SMF_APP, TASK_SMF_N4); TASK_SMF_APP, TASK_SMF_N4);
...@@ -859,11 +854,6 @@ void smf_context::handle_itti_msg( ...@@ -859,11 +854,6 @@ void smf_context::handle_itti_msg(
session_report_msg.set_json_data(json_data); session_report_msg.set_json_data(json_data);
// itti_n11_session_report_request* itti_n11 =
// new itti_n11_session_report_request(TASK_SMF_APP,
// TASK_SMF_SBI);
// itti_n11->http_version = 1; // use HTTPv1 for the
// moment
std::shared_ptr<itti_n11_session_report_request> itti_n11_report = std::shared_ptr<itti_n11_session_report_request> itti_n11_report =
std::make_shared<itti_n11_session_report_request>( std::make_shared<itti_n11_session_report_request>(
TASK_SMF_APP, TASK_SMF_SBI); TASK_SMF_APP, TASK_SMF_SBI);
...@@ -1287,10 +1277,6 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1287,10 +1277,6 @@ void smf_context::handle_pdu_session_create_sm_context_request(
// Store HttpResponse and session-related information to be used when // Store HttpResponse and session-related information to be used when
// receiving the response from UPF // receiving the response from UPF
/* itti_n11_create_sm_context_response* sm_context_resp =
new itti_n11_create_sm_context_response(
TASK_SMF_APP, TASK_SMF_SBI, smreq->pid);
*/
std::shared_ptr<itti_n11_create_sm_context_response> sm_context_resp_pending = std::shared_ptr<itti_n11_create_sm_context_response> sm_context_resp_pending =
std::make_shared<itti_n11_create_sm_context_response>( std::make_shared<itti_n11_create_sm_context_response>(
TASK_SMF_APP, TASK_SMF_SBI, smreq->pid); TASK_SMF_APP, TASK_SMF_SBI, smreq->pid);
...@@ -2365,9 +2351,6 @@ bool smf_context::handle_pdu_session_update_sm_context_request( ...@@ -2365,9 +2351,6 @@ bool smf_context::handle_pdu_session_update_sm_context_request(
// we need to store HttpResponse and session-related information to be used // we need to store HttpResponse and session-related information to be used
// when receiving the response from UPF // when receiving the response from UPF
// itti_n11_update_sm_context_response* n11_sm_context_resp =
// new itti_n11_update_sm_context_response(
// TASK_SMF_SBI, TASK_SMF_APP, smreq->pid);
std::shared_ptr<itti_n11_update_sm_context_response> sm_context_resp_pending = std::shared_ptr<itti_n11_update_sm_context_response> sm_context_resp_pending =
std::make_shared<itti_n11_update_sm_context_response>( std::make_shared<itti_n11_update_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, smreq->pid); TASK_SMF_SBI, TASK_SMF_APP, smreq->pid);
...@@ -2889,11 +2872,6 @@ void smf_context::handle_pdu_session_release_sm_context_request( ...@@ -2889,11 +2872,6 @@ void smf_context::handle_pdu_session_release_sm_context_request(
return; return;
} }
/* itti_n11_release_sm_context_response* n11_sm_context_resp =
new itti_n11_release_sm_context_response(
TASK_SMF_SBI, TASK_SMF_APP, smreq->pid);
*/
std::shared_ptr<itti_n11_release_sm_context_response> std::shared_ptr<itti_n11_release_sm_context_response>
sm_context_resp_pending = sm_context_resp_pending =
std::make_shared<itti_n11_release_sm_context_response>( std::make_shared<itti_n11_release_sm_context_response>(
......
...@@ -610,26 +610,19 @@ void smf_n4::handle_receive_session_establishment_response( ...@@ -610,26 +610,19 @@ void smf_n4::handle_receive_session_establishment_response(
handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id); handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id);
if (!error) { if (!error) {
/* itti_n4_session_establishment_response* itti_msg = std::shared_ptr<itti_n4_session_establishment_response> itti_msg =
new itti_n4_session_establishment_response(TASK_SMF_N4, std::make_shared<itti_n4_session_establishment_response>(
TASK_SMF_APP); itti_msg->pfcp_ies = msg_ies_container; TASK_SMF_N4, TASK_SMF_APP);
itti_msg->pfcp_ies = msg_ies_container;
itti_msg->r_endpoint = remote_endpoint; itti_msg->r_endpoint = remote_endpoint;
itti_msg->trxn_id = trxn_id; itti_msg->trxn_id = trxn_id;
itti_msg->seid = msg.get_seid(); itti_msg->seid = msg.get_seid();
*/
std::shared_ptr<itti_n4_session_establishment_response> i =
std::make_shared<itti_n4_session_establishment_response>(
TASK_SMF_N4, TASK_SMF_APP);
i->pfcp_ies = msg_ies_container;
i->r_endpoint = remote_endpoint;
i->trxn_id = trxn_id;
i->seid = msg.get_seid();
int ret = itti_inst->send_msg(i); int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) { if (RETURNok != ret) {
Logger::smf_n4().error( Logger::smf_n4().error(
"Could not send ITTI message %s to task TASK_SMF_APP", "Could not send ITTI message %s to task TASK_SMF_APP",
i->get_msg_name()); itti_msg->get_msg_name());
} }
} }
// else ignore // else ignore
...@@ -645,14 +638,6 @@ void smf_n4::handle_receive_session_modification_response( ...@@ -645,14 +638,6 @@ void smf_n4::handle_receive_session_modification_response(
handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id); handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id);
if (!error) { if (!error) {
/* itti_n4_session_modification_response* itti_msg =
new itti_n4_session_modification_response(TASK_SMF_N4,
TASK_SMF_APP); itti_msg->pfcp_ies = msg_ies_container;
itti_msg->r_endpoint = remote_endpoint;
itti_msg->trxn_id = trxn_id;
itti_msg->seid = msg.get_seid();
*/
std::shared_ptr<itti_n4_session_modification_response> itti_msg = std::shared_ptr<itti_n4_session_modification_response> itti_msg =
std::make_shared<itti_n4_session_modification_response>( std::make_shared<itti_n4_session_modification_response>(
TASK_SMF_N4, TASK_SMF_APP); TASK_SMF_N4, TASK_SMF_APP);
...@@ -682,14 +667,6 @@ void smf_n4::handle_receive_session_deletion_response( ...@@ -682,14 +667,6 @@ void smf_n4::handle_receive_session_deletion_response(
handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id); handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id);
if (!error) { if (!error) {
/* itti_n4_session_deletion_response* itti_msg =
new itti_n4_session_deletion_response(TASK_SMF_N4, TASK_SMF_APP);
itti_msg->pfcp_ies = msg_ies_container;
itti_msg->r_endpoint = remote_endpoint;
itti_msg->trxn_id = trxn_id;
itti_msg->seid = msg.get_seid();
*/
std::shared_ptr<itti_n4_session_deletion_response> itti_msg = std::shared_ptr<itti_n4_session_deletion_response> itti_msg =
std::make_shared<itti_n4_session_deletion_response>( std::make_shared<itti_n4_session_deletion_response>(
TASK_SMF_N4, TASK_SMF_APP); TASK_SMF_N4, TASK_SMF_APP);
...@@ -719,14 +696,6 @@ void smf_n4::handle_receive_session_report_request( ...@@ -719,14 +696,6 @@ void smf_n4::handle_receive_session_report_request(
handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id); handle_receive_message_cb(msg, remote_endpoint, TASK_SMF_N4, error, trxn_id);
if (!error) { if (!error) {
/* itti_n4_session_report_request* itti_msg =
new itti_n4_session_report_request(TASK_SMF_N4, TASK_SMF_APP);
itti_msg->pfcp_ies = msg_ies_container;
itti_msg->r_endpoint = remote_endpoint;
itti_msg->trxn_id = trxn_id;
itti_msg->seid = msg.get_seid();
*/
std::shared_ptr<itti_n4_session_report_request> itti_msg = std::shared_ptr<itti_n4_session_report_request> itti_msg =
std::make_shared<itti_n4_session_report_request>( std::make_shared<itti_n4_session_report_request>(
TASK_SMF_N4, TASK_SMF_APP); TASK_SMF_N4, TASK_SMF_APP);
......
...@@ -260,10 +260,6 @@ void smf_sbi::send_n1n2_message_transfer_request( ...@@ -260,10 +260,6 @@ void smf_sbi::send_n1n2_message_transfer_request(
response_data_json["cause"].dump().c_str()); response_data_json["cause"].dump().c_str());
// Send response to APP to process // Send response to APP to process
/* itti_n11_n1n2_message_transfer_response_status* itti_msg =
new itti_n11_n1n2_message_transfer_response_status(
TASK_SMF_SBI, TASK_SMF_APP);
*/
std::shared_ptr<itti_n11_n1n2_message_transfer_response_status> itti_msg = std::shared_ptr<itti_n11_n1n2_message_transfer_response_status> itti_msg =
std::make_shared<itti_n11_n1n2_message_transfer_response_status>( std::make_shared<itti_n11_n1n2_message_transfer_response_status>(
TASK_SMF_SBI, TASK_SMF_APP); TASK_SMF_SBI, TASK_SMF_APP);
...@@ -425,10 +421,6 @@ void smf_sbi::send_n1n2_message_transfer_request( ...@@ -425,10 +421,6 @@ void smf_sbi::send_n1n2_message_transfer_request(
response_data_json["cause"].dump().c_str()); response_data_json["cause"].dump().c_str());
// Send response to APP to process // Send response to APP to process
/* itti_n11_n1n2_message_transfer_response_status* itti_msg =
new itti_n11_n1n2_message_transfer_response_status(
TASK_SMF_SBI, TASK_SMF_APP);
*/
std::shared_ptr<itti_n11_n1n2_message_transfer_response_status> itti_msg = std::shared_ptr<itti_n11_n1n2_message_transfer_response_status> itti_msg =
std::make_shared<itti_n11_n1n2_message_transfer_response_status>( std::make_shared<itti_n11_n1n2_message_transfer_response_status>(
TASK_SMF_SBI, TASK_SMF_APP); TASK_SMF_SBI, TASK_SMF_APP);
......
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