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

Use SCID instead of PDU session id as parameter for timeout handler

parent 0c325a38
......@@ -273,7 +273,8 @@ void smf_app_task(void*) {
Logger::smf_app().info("TIME-OUT event timer id %d", to->timer_id);
switch (to->arg1_user) {
case TASK_SMF_APP_TRIGGER_T3591:
smf_app_inst->timer_t3591_timeout(to->timer_id, to->arg2_user);
smf_app_inst->timer_t3591_timeout(
to->timer_id, (scid_t) to->arg2_user);
break;
case TASK_SMF_APP_TIMEOUT_NRF_HEARTBEAT:
smf_app_inst->timer_nrf_heartbeat_timeout(
......@@ -1597,7 +1598,7 @@ void smf_app::update_pdu_session_upCnx_state(
upCnx_state_e2str.at(static_cast<int>(state)).c_str());
}
//---------------------------------------------------------------------------------------------
void smf_app::timer_t3591_timeout(timer_id_t timer_id, uint64_t arg2_user) {
void smf_app::timer_t3591_timeout(timer_id_t timer_id, scid_t scid) {
// TODO: send session modification request again...
}
......
......@@ -615,10 +615,10 @@ class smf_app {
/*
* will be executed when timer T3591 expires
* @param [timer_id_t] timer_id
* @param [uint64_t] arg2_user
* @param [scid_t] scid
* @return void
*/
void timer_t3591_timeout(timer_id_t timer_id, uint64_t arg2_user);
void timer_t3591_timeout(timer_id_t timer_id, scid_t scid);
/*
* will be executed when NRF Heartbeat timer expires
......
......@@ -1792,11 +1792,21 @@ bool smf_context::handle_pdu_session_modification_request(
// Update PDU Session status
sp.get()->set_pdu_session_status(
pdu_session_status_e::PDU_SESSION_MODIFICATION_PENDING);
scid_t scid = {};
try {
scid = std::stoi(sm_context_request.get()->scid);
} catch (const std::exception& err) {
Logger::smf_app().warn(
"Couldn't retrieve "
"the corresponding SMF context, ignore message!");
return false;
}
// start timer T3591
// get smf_pdu_session and set the corresponding timer
sp.get()->timer_T3591 = itti_inst->timer_setup(
T3591_TIMER_VALUE_SEC, 0, TASK_SMF_APP, TASK_SMF_APP_TRIGGER_T3591,
sm_context_request.get()->req.get_pdu_session_id());
T3591_TIMER_VALUE_SEC, 0, TASK_SMF_APP, TASK_SMF_APP_TRIGGER_T3591, scid);
free_wrapper((void**) &nas_msg.plain.sm.pdu_session_modification_request
.qosflowdescriptions.qosflowdescriptionscontents);
......
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