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

Fix issue for SM Context Release notification

parent 3fa4362d
...@@ -1883,10 +1883,9 @@ bool smf_context::handle_pdu_session_release_complete( ...@@ -1883,10 +1883,9 @@ bool smf_context::handle_pdu_session_release_complete(
} }
Logger::smf_app().debug("Signal the SM Context Status Change"); Logger::smf_app().debug("Signal the SM Context Status Change");
std::string status = "RELEASED";
event_sub.sm_context_status( event_sub.sm_context_status(
scid, scid, status, sm_context_request.get()->http_version);
static_cast<uint8_t>(sm_context_status_e::SM_CONTEXT_STATUS_RELEASED),
sm_context_request.get()->http_version);
// Trigger PDU Session Release event notification // Trigger PDU Session Release event notification
supi64_t supi64 = smf_supi_to_u64(sm_context_request.get()->req.get_supi()); supi64_t supi64 = smf_supi_to_u64(sm_context_request.get()->req.get_supi());
...@@ -2895,7 +2894,7 @@ bool smf_context::find_pdu_session( ...@@ -2895,7 +2894,7 @@ bool smf_context::find_pdu_session(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_context::handle_sm_context_status_change( void smf_context::handle_sm_context_status_change(
scid_t scid, uint8_t status, uint8_t http_version) { scid_t scid, const std::string& status, uint8_t http_version) {
Logger::smf_app().debug( Logger::smf_app().debug(
"Send request to N11 to triger SM Context Status Notification to AMF, " "Send request to N11 to triger SM Context Status Notification to AMF, "
"SMF Context ID " SCID_FMT " ", "SMF Context ID " SCID_FMT " ",
...@@ -2916,11 +2915,10 @@ void smf_context::handle_sm_context_status_change( ...@@ -2916,11 +2915,10 @@ void smf_context::handle_sm_context_status_change(
std::shared_ptr<itti_n11_notify_sm_context_status> itti_msg = std::shared_ptr<itti_n11_notify_sm_context_status> itti_msg =
std::make_shared<itti_n11_notify_sm_context_status>( std::make_shared<itti_n11_notify_sm_context_status>(
TASK_SMF_APP, TASK_SMF_N11); TASK_SMF_APP, TASK_SMF_N11);
itti_msg->scid = scid; itti_msg->scid = scid;
itti_msg->sm_context_status = itti_msg->sm_context_status = status;
sm_context_status_e2str.at(static_cast<int>(status)); itti_msg->amf_status_uri = scf.get()->amf_status_uri;
itti_msg->amf_status_uri = scf.get()->amf_status_uri; itti_msg->http_version = http_version;
itti_msg->http_version = http_version;
int ret = itti_inst->send_msg(itti_msg); int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) { if (RETURNok != ret) {
......
...@@ -552,11 +552,11 @@ class smf_context : public std::enable_shared_from_this<smf_context> { ...@@ -552,11 +552,11 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
// Subscribe to sm context status change // Subscribe to sm context status change
sm_context_status_connection = sm_context_status_connection =
event_sub.subscribe_sm_context_status(boost::bind( event_sub.subscribe_sm_context_status(boost::bind(
&smf_context::handle_sm_context_status_change, this, _1, _1, _1)); &smf_context::handle_sm_context_status_change, this, _1, _2, _3));
// Subscribe to pdu session release (event exposure) // Subscribe to pdu session release (event exposure)
ee_pdu_session_release_connection = ee_pdu_session_release_connection =
event_sub.subscribe_ee_pdu_session_release(boost::bind( event_sub.subscribe_ee_pdu_session_release(boost::bind(
&smf_context::handle_ee_pdu_session_release, this, _1, _1, _1)); &smf_context::handle_ee_pdu_session_release, this, _1, _2, _3));
} }
smf_context(smf_context& b) = delete; smf_context(smf_context& b) = delete;
...@@ -988,7 +988,7 @@ class smf_context : public std::enable_shared_from_this<smf_context> { ...@@ -988,7 +988,7 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
* @return void * @return void
*/ */
void handle_sm_context_status_change( void handle_sm_context_status_change(
scid_t scid, uint8_t status, uint8_t http_version); scid_t scid, const std::string& status, uint8_t http_version);
/* /*
* Handle SM Context Status Change (Send notification AMF) * Handle SM Context Status Change (Send notification AMF)
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define FILE_SMF_EVENT_SIG_HPP_SEEN #define FILE_SMF_EVENT_SIG_HPP_SEEN
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
#include <string>
#include "3gpp_24.007.h" #include "3gpp_24.007.h"
namespace bs2 = boost::signals2; namespace bs2 = boost::signals2;
...@@ -40,7 +41,7 @@ namespace smf { ...@@ -40,7 +41,7 @@ namespace smf {
// Signal for PDU session status // Signal for PDU session status
// SCID, PDU Session Status, HTTP version // SCID, PDU Session Status, HTTP version
typedef bs2::signal_type< typedef bs2::signal_type<
void(scid_t, uint8_t, uint8_t), void(scid_t, const std::string&, uint8_t),
bs2::keywords::mutex_type<bs2::dummy_mutex>>::type sm_context_status_sig_t; bs2::keywords::mutex_type<bs2::dummy_mutex>>::type sm_context_status_sig_t;
// Signal for Event exposure // Signal for Event exposure
......
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