Commit 2c3b8e2f authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

remove uncessary code

parent 375331d1
...@@ -323,8 +323,7 @@ smf_app::smf_app(const std::string& config_file) ...@@ -323,8 +323,7 @@ smf_app::smf_app(const std::string& config_file)
m_scid2smf_context(), m_scid2smf_context(),
m_sm_context_create_promises(), m_sm_context_create_promises(),
m_sm_context_update_promises(), m_sm_context_update_promises(),
m_sm_context_release_promises(), m_sm_context_release_promises() {
event_sub(){
Logger::smf_app().startup("Starting..."); Logger::smf_app().startup("Starting...");
supi2smf_context = {}; supi2smf_context = {};
...@@ -332,9 +331,9 @@ smf_app::smf_app(const std::string& config_file) ...@@ -332,9 +331,9 @@ smf_app::smf_app(const std::string& config_file)
seid_n4_generator = 0; seid_n4_generator = 0;
// Subscribe to sm context status change // Subscribe to sm context status change
pdu_session_status_connection = // pdu_session_status_connection =
event_sub.subscribe_ee_pdu_session_status_change(boost::bind( // event_sub.subscribe_ee_pdu_session_status_change(boost::bind(
&smf_app::handle_pdu_session_status_change, this, _1, _2, _3)); // &smf_app::handle_pdu_session_status_change, this, _1, _2, _3));
apply_config(smf_cfg); apply_config(smf_cfg);
...@@ -622,17 +621,18 @@ void smf_app::handle_itti_msg(itti_n11_update_pdu_session_status& m) { ...@@ -622,17 +621,18 @@ void smf_app::handle_itti_msg(itti_n11_update_pdu_session_status& m) {
pdu_session_status_e2str.at(static_cast<int>(m.pdu_session_status)) pdu_session_status_e2str.at(static_cast<int>(m.pdu_session_status))
.c_str()); .c_str());
update_pdu_session_status(m.scid, m.pdu_session_status); update_pdu_session_status(m.scid, m.pdu_session_status);
if ((m.pdu_session_status == pdu_session_status_e::PDU_SESSION_ACTIVE) or (m.pdu_session_status == pdu_session_status_e::PDU_SESSION_INACTIVE)){ if ((m.pdu_session_status == pdu_session_status_e::PDU_SESSION_ACTIVE) or
(m.pdu_session_status == pdu_session_status_e::PDU_SESSION_INACTIVE)) {
Logger::smf_app().info("Notify PDU Session Status change"); Logger::smf_app().info("Notify PDU Session Status change");
std::string status; std::string status;
if (m.pdu_session_status == pdu_session_status_e::PDU_SESSION_ACTIVE) /* if (m.pdu_session_status == pdu_session_status_e::PDU_SESSION_ACTIVE)
status = "ESTABLISHED"; status = "ESTABLISHED";
else else
status = "RELEASED"; status = "RELEASED";
event_sub.ee_pdu_session_status( event_sub.ee_pdu_session_status(
m.scid, status, 1); m.scid, status, 1);
*/
} }
} }
...@@ -2163,7 +2163,8 @@ void smf_app::handle_pdu_session_status_change( ...@@ -2163,7 +2163,8 @@ void smf_app::handle_pdu_session_status_change(
} }
Logger::smf_app().debug( Logger::smf_app().debug(
"Send request to N11 to triger PDU Session Status Change Notification (Event " "Send request to N11 to triger PDU Session Status Change Notification "
"(Event "
"Exposure), SUPI " SUPI_64_FMT " , PDU Session ID %d, HTTP version %d", "Exposure), SUPI " SUPI_64_FMT " , PDU Session ID %d, HTTP version %d",
supi, pdu_session_id, http_version); supi, pdu_session_id, http_version);
...@@ -2186,7 +2187,7 @@ void smf_app::handle_pdu_session_status_change( ...@@ -2186,7 +2187,7 @@ void smf_app::handle_pdu_session_status_change(
ev_notif.set_smf_event(smf_event_t::SMF_EVENT_PDU_SES_REL); ev_notif.set_smf_event(smf_event_t::SMF_EVENT_PDU_SES_REL);
ev_notif.set_notif_uri(i.get()->notif_uri); ev_notif.set_notif_uri(i.get()->notif_uri);
ev_notif.set_notif_id(i.get()->notif_id); ev_notif.set_notif_id(i.get()->notif_id);
//custom json e.g., for FlexCN // custom json e.g., for FlexCN
nlohmann::json cj = {}; nlohmann::json cj = {};
if (sp.get() != nullptr) { if (sp.get() != nullptr) {
if (sp->ipv4) { if (sp->ipv4) {
...@@ -2211,4 +2212,3 @@ void smf_app::handle_pdu_session_status_change( ...@@ -2211,4 +2212,3 @@ void smf_app::handle_pdu_session_status_change(
Logger::smf_app().debug("No subscription available for this event"); Logger::smf_app().debug("No subscription available for this event");
} }
} }
...@@ -149,10 +149,9 @@ class smf_app { ...@@ -149,10 +149,9 @@ class smf_app {
timer_id_t timer_nrf_heartbeat; timer_id_t timer_nrf_heartbeat;
// for Event Handling // for Event Handling
smf_event event_sub; // smf_event event_sub;
bs2::connection pdu_session_status_connection; // bs2::connection pdu_session_status_connection;
bs2::connection ee_pdu_session_release_connection; // bs2::connection ee_pdu_session_release_connection;
/* /*
* Apply the config from the configuration file for DNN pools * Apply the config from the configuration file for DNN pools
...@@ -219,8 +218,9 @@ class smf_app { ...@@ -219,8 +218,9 @@ class smf_app {
virtual ~smf_app() { virtual ~smf_app() {
Logger::smf_app().debug("Delete SMF_APP instance..."); Logger::smf_app().debug("Delete SMF_APP instance...");
// Disconnect the boost connection // Disconnect the boost connection
if (pdu_session_status_connection.connected()) /* if (pdu_session_status_connection.connected())
pdu_session_status_connection.disconnect(); pdu_session_status_connection.disconnect();
*/
// TODO: Unregister NRF // TODO: Unregister NRF
} }
......
...@@ -48,7 +48,8 @@ typedef bs2::signal_type< ...@@ -48,7 +48,8 @@ typedef bs2::signal_type<
// SCID, PDU Session Status, HTTP version // SCID, PDU Session Status, HTTP version
typedef bs2::signal_type< typedef bs2::signal_type<
void(scid_t, const std::string&, uint8_t), void(scid_t, const std::string&, uint8_t),
bs2::keywords::mutex_type<bs2::dummy_mutex>>::type ee_pdu_session_status_sig_t; bs2::keywords::mutex_type<bs2::dummy_mutex>>::type
ee_pdu_session_status_sig_t;
// Signal for Event exposure // Signal for Event exposure
// PDU session Release, SUPI, PDU SessionID, HTTP version // PDU session Release, SUPI, PDU SessionID, HTTP version
...@@ -62,6 +63,7 @@ typedef bs2::signal_type< ...@@ -62,6 +63,7 @@ typedef bs2::signal_type<
// TODO: UP Path Change // TODO: UP Path Change
// TODO: PLMN Change // TODO: PLMN Change
// TODO: Downlink data delivery status // TODO: Downlink data delivery status
// TODO: Customized APIs for FlexCN
} // namespace smf } // namespace smf
#endif /* FILE_SMF_EVENT_SIG_HPP_SEEN */ #endif /* FILE_SMF_EVENT_SIG_HPP_SEEN */
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