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

Code cleanup for N10/N11

parent d432fdab
......@@ -68,10 +68,6 @@ void smf_n10_task(void *args_p) {
auto *msg = shared_msg.get();
switch (msg->msg_type) {
case N10_SESSION_GET_SESSION_MANAGEMENT_SUBSCRIPTION:
// if (itti_n10_get_session_management_subscription* m =
// dynamic_cast<itti_n10_get_session_management_subscription*>(msg)) {
// smf_n10_inst->send_sm_data_get_msg(ref(*m));
//}
break;
case TERMINATE:
......@@ -104,8 +100,6 @@ bool smf_n10::get_sm_data(
const supi64_t &supi, const std::string &dnn, const snssai_t &snssai,
std::shared_ptr<session_management_subscription> subscription) {
// retrieve a UE's Session Management Subscription Data
// (TS29503_Nudm_SDM.yaml: /{supi}/sm-data) use curl to send data for the
// moment
nlohmann::json jsonData = {};
curl_global_init(CURL_GLOBAL_DEFAULT);
......@@ -138,7 +132,6 @@ bool smf_n10::get_sm_data(
// Hook up data handling function.
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData.get());
// curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData);
int numRetries = 0;
while (numRetries < UDM_NUMBER_RETRIES) {
res = curl_easy_perform(curl);
......@@ -151,7 +144,6 @@ bool smf_n10::get_sm_data(
url.c_str());
try {
jsonData = nlohmann::json::parse(*httpData.get());
// curl_easy_cleanup(curl);
break;
} catch (json::exception &e) {
Logger::smf_n10().warn("Could not parse json data from UDM");
......@@ -178,7 +170,6 @@ bool smf_n10::get_sm_data(
try {
std::shared_ptr<dnn_configuration_t> dnn_configuration =
std::make_shared<dnn_configuration_t>();
// PDU Session Type
pdu_session_type_t pdu_session_type(
pdu_session_type_e::PDU_SESSION_TYPE_E_IPV4);
std::string default_session_type =
......
......@@ -134,9 +134,6 @@ smf_n11::smf_n11() {
//------------------------------------------------------------------------------
void smf_n11::send_n1n2_message_transfer_request(
std::shared_ptr<itti_n11_create_sm_context_response> sm_context_res) {
// Transfer N1/N2 message via AMF by using
// N_amf_Communication_N1N2MessageTransfer (see
// TS29518_Namf_Communication.yaml)
Logger::smf_n11().debug(
"Send Communication_N1N2MessageTransfer to AMF (HTTP version %d)",
sm_context_res->http_version);
......@@ -256,10 +253,6 @@ void smf_n11::send_n1n2_message_transfer_request(
void smf_n11::send_n1n2_message_transfer_request(
std::shared_ptr<itti_nx_trigger_pdu_session_modification>
sm_session_modification) {
// Transfer N1/N2 message via AMF by using
// N_amf_Communication_N1N2MessageTransfer (see
// TS29518_Namf_Communication.yaml)
Logger::smf_n11().debug("Send Communication_N1N2MessageTransfer to AMF");
mime_parser parser = {};
......@@ -531,7 +524,6 @@ void smf_n11::notify_subscribed_event(
std::unique_ptr<std::string> httpData(new std::string());
std::string data;
// init curl
curl_global_init(CURL_GLOBAL_ALL);
m_curl_multi = curl_multi_init();
// init header
......@@ -647,3 +639,5 @@ CURL *smf_n11::curl_create_handle(event_notification &ev_notif,
}
return curl;
}
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