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(
}
Logger::smf_app().debug("Signal the SM Context Status Change");
std::string status = "RELEASED";
event_sub.sm_context_status(
scid,
static_cast<uint8_t>(sm_context_status_e::SM_CONTEXT_STATUS_RELEASED),
sm_context_request.get()->http_version);
scid, status, sm_context_request.get()->http_version);
// Trigger PDU Session Release event notification
supi64_t supi64 = smf_supi_to_u64(sm_context_request.get()->req.get_supi());
......@@ -2895,7 +2894,7 @@ bool smf_context::find_pdu_session(
//------------------------------------------------------------------------------
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(
"Send request to N11 to triger SM Context Status Notification to AMF, "
"SMF Context ID " SCID_FMT " ",
......@@ -2917,8 +2916,7 @@ void smf_context::handle_sm_context_status_change(
std::make_shared<itti_n11_notify_sm_context_status>(
TASK_SMF_APP, TASK_SMF_N11);
itti_msg->scid = scid;
itti_msg->sm_context_status =
sm_context_status_e2str.at(static_cast<int>(status));
itti_msg->sm_context_status = status;
itti_msg->amf_status_uri = scf.get()->amf_status_uri;
itti_msg->http_version = http_version;
......
......@@ -552,11 +552,11 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
// Subscribe to sm context status change
sm_context_status_connection =
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)
ee_pdu_session_release_connection =
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;
......@@ -988,7 +988,7 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
* @return void
*/
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)
......
......@@ -31,6 +31,7 @@
#define FILE_SMF_EVENT_SIG_HPP_SEEN
#include <boost/signals2.hpp>
#include <string>
#include "3gpp_24.007.h"
namespace bs2 = boost::signals2;
......@@ -40,7 +41,7 @@ namespace smf {
// Signal for PDU session status
// SCID, PDU Session Status, HTTP version
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;
// 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