Commit c240e30e authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Bugfix for PDU Session Release Notification

parent 273546b9
......@@ -146,7 +146,8 @@ void IndividualSMContextApiImpl::update_sm_context(
sm_context_req_msg.set_n2_sm_information(n2_sm_information);
sm_context_req_msg.set_n2_sm_info_type(n2_sm_info_type);
} else if (smContextUpdateData.n1SmMsgIsSet()) {
}
if (smContextUpdateData.n1SmMsgIsSet()) {
//N1 SM (for session modification)
std::string n1_sm_message =
smContextUpdateMessage.getBinaryDataN1SmMessage();
......@@ -241,8 +242,7 @@ void IndividualSMContextApiImpl::update_sm_context(
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType(
"multipart/related; boundary=" + std::string(CURL_MIME_BOUNDARY)));
}
if (sm_context_response.n2_sm_info_is_set()) {
} else if (sm_context_response.n2_sm_info_is_set()) {
parser.create_multipart_related_content(
body, json_data.dump(), CURL_MIME_BOUNDARY,
sm_context_response.get_n2_sm_information(),
......
......@@ -118,11 +118,12 @@ void smf_event::send_ee_pdu_session_release(supi64_t supi,
uint8_t http_version) {
Logger::smf_app().debug("Send request to N11 to triger PDU Session Release Notification, SUPI " SUPI_64_FMT " , PDU Session ID %d, HTTP version %d", supi, pdu_session_id, http_version);
std::vector < std::shared_ptr < smf_subscription >> subscriptions;
std::shared_ptr<smf_subscription> subscription;
//std::vector < std::shared_ptr < smf_subscription >> subscriptions;
std::shared_ptr<smf_subscription> subscription = {};
smf_app_inst->get_ee_subscriptions(smf_event_t::SMF_EVENT_PDU_SES_REL, supi,
pdu_session_id, subscription);
if (subscription.get() != nullptr) {
//Send request to N11 to trigger the notification to the subscribed event
Logger::smf_app().debug(
"Send ITTI msg to SMF N11 to trigger the event notification");
......@@ -141,5 +142,5 @@ void smf_event::send_ee_pdu_session_release(supi64_t supi,
"Could not send ITTI message %s to task TASK_SMF_N11",
itti_msg->get_msg_name());
}
}
}
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