Skip to content

Commit

Permalink
[lte][agw] Remove paging timer when ue context is removed (magma#4302)
Browse files Browse the repository at this point in the history
* Remove paging timer when ue context is removed

Signed-off-by: Ulas Kozat <kozat@fb.com>
  • Loading branch information
ulaskozat committed Jan 9, 2021
1 parent 2501ef1 commit de25368
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lte/gateway/c/oai/tasks/mme_app/mme_app_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void mme_app_ue_context_free_content(ue_mm_context_t* const ue_context_p) {

// Stop ULR Response timer if running
if (ue_context_p->ulr_response_timer.id != MME_APP_TIMER_INACTIVE_ID) {
nas_itti_timer_arg_t* timer_argP = NULL;
timer_argP = NULL;
if (timer_remove(
ue_context_p->ulr_response_timer.id, (void**) &timer_argP)) {
OAILOG_ERROR_UE(
Expand All @@ -316,6 +316,22 @@ void mme_app_ue_context_free_content(ue_mm_context_t* const ue_context_p) {
ue_context_p->ulr_response_timer.id = MME_APP_TIMER_INACTIVE_ID;
}

// Stop paging response timer if running
if (ue_context_p->paging_response_timer.id != MME_APP_TIMER_INACTIVE_ID) {
timer_argP = NULL;
if (timer_remove(
ue_context_p->paging_response_timer.id, (void**) &timer_argP)) {
OAILOG_ERROR_UE(
LOG_MME_APP, ue_context_p->emm_context._imsi64,
"Failed to stop Paging Response timer for UE id %d \n",
ue_context_p->mme_ue_s1ap_id);
}
if (timer_argP) {
free_wrapper((void**) &timer_argP);
}
ue_context_p->paging_response_timer.id = MME_APP_TIMER_INACTIVE_ID;
}

if (ue_context_p->sgs_context != NULL) {
// free the sgs context
mme_app_ue_sgs_context_free_content(
Expand Down

0 comments on commit de25368

Please sign in to comment.