Commit 9238330e authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup for Timer handling T3591/3592

parent b3ba2eaf
......@@ -1644,37 +1644,9 @@ void smf_app::update_pdu_session_upCnx_state(
void smf_app::timer_t3591_timeout(timer_id_t timer_id, scid_t scid) {
// Re-send Session Modification Command ...
// get the SMF Context
std::shared_ptr<smf_context_ref> scf = {};
if (is_scid_2_smf_context(scid)) {
scf = scid_2_smf_context(scid);
} else {
Logger::smf_app().warn(
"Context associated with this id " SCID_FMT " does not exit!", scid);
}
supi_t supi = scf.get()->supi;
supi64_t supi64 = smf_supi_to_u64(supi);
pdu_session_id_t pdu_session_id = scf.get()->pdu_session_id;
std::shared_ptr<smf_context> sc = {};
if (is_supi_2_smf_context(supi64)) {
sc = supi_2_smf_context(supi64);
Logger::smf_app().debug(
"Retrieve SMF context with SUPI " SUPI_64_FMT "", supi64);
} else {
Logger::smf_app().warn(
"Could not retrieve the corresponding SMF context with "
"Supi " SUPI_64_FMT "!",
supi64);
}
// Get PDU Session
std::shared_ptr<smf_pdu_session> sp = {};
if (!sc.get()->find_pdu_session(pdu_session_id, sp)) {
if (!find_pdu_session(scid, sp)) {
Logger::smf_app().warn(
"Could not retrieve the corresponding SMF PDU Session context!");
return;
......@@ -1725,37 +1697,9 @@ void smf_app::timer_t3591_timeout(timer_id_t timer_id, scid_t scid) {
void smf_app::timer_t3592_timeout(timer_id_t timer_id, scid_t scid) {
// Re-send Session Release Command ...
// get the SMF Context
std::shared_ptr<smf_context_ref> scf = {};
if (is_scid_2_smf_context(scid)) {
scf = scid_2_smf_context(scid);
} else {
Logger::smf_app().warn(
"Context associated with this id " SCID_FMT " does not exit!", scid);
}
supi_t supi = scf.get()->supi;
supi64_t supi64 = smf_supi_to_u64(supi);
pdu_session_id_t pdu_session_id = scf.get()->pdu_session_id;
std::shared_ptr<smf_context> sc = {};
if (is_supi_2_smf_context(supi64)) {
sc = supi_2_smf_context(supi64);
Logger::smf_app().debug(
"Retrieve SMF context with SUPI " SUPI_64_FMT "", supi64);
} else {
Logger::smf_app().warn(
"Could not retrieve the corresponding SMF context with "
"Supi " SUPI_64_FMT "!",
supi64);
}
// Get PDU Session
std::shared_ptr<smf_pdu_session> sp = {};
if (!sc.get()->find_pdu_session(pdu_session_id, sp)) {
if (!find_pdu_session(scid, sp)) {
Logger::smf_app().warn(
"Could not retrieve the corresponding SMF PDU Session context!");
return;
......
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