diff --git a/lib/core/ogs-timer.c b/lib/core/ogs-timer.c index 7f7042aeb..90c01c9db 100644 --- a/lib/core/ogs-timer.c +++ b/lib/core/ogs-timer.c @@ -159,12 +159,6 @@ void ogs_timer_stop_debug(ogs_timer_t *timer, const char *file_line) ogs_rbtree_delete(&manager->tree, timer); } -bool ogs_timer_running(ogs_timer_t *timer) -{ - ogs_assert(timer); - return timer->running; -} - ogs_time_t ogs_timer_mgr_next(ogs_timer_mgr_t *manager) { ogs_time_t current; diff --git a/lib/core/ogs-timer.h b/lib/core/ogs-timer.h index ca017700d..f38b208a3 100644 --- a/lib/core/ogs-timer.h +++ b/lib/core/ogs-timer.h @@ -58,8 +58,6 @@ void ogs_timer_start_debug( ogs_timer_stop_debug(timer, OGS_FILE_LINE) void ogs_timer_stop_debug(ogs_timer_t *timer, const char *file_line); -bool ogs_timer_running(ogs_timer_t *timer); - ogs_time_t ogs_timer_mgr_next(ogs_timer_mgr_t *manager); void ogs_timer_mgr_expire(ogs_timer_mgr_t *manager); diff --git a/src/amf/namf-handler.c b/src/amf/namf-handler.c index db0e89f94..764fa7201 100644 --- a/src/amf/namf-handler.c +++ b/src/amf/namf-handler.c @@ -274,23 +274,18 @@ int amf_namf_comm_handle_n1_n2_message_transfer( sendmsg.http.location = ogs_sbi_server_uri(server, &header); - if (ogs_timer_running( - amf_ue->implicit_deregistration.timer) == true) { - ogs_warn("[%s] Paging failed. Stop", amf_ue->supi); - } else { - /* Store Paging Info */ - AMF_SESS_STORE_PAGING_INFO( - sess, sendmsg.http.location, - N1N2MessageTransferReqData->n1n2_failure_txf_notif_uri); + /* Store Paging Info */ + AMF_SESS_STORE_PAGING_INFO( + sess, sendmsg.http.location, + N1N2MessageTransferReqData->n1n2_failure_txf_notif_uri); - /* Store N2 Transfer message */ - AMF_SESS_STORE_N2_TRANSFER( - sess, pdu_session_resource_setup_request, n2buf); + /* Store N2 Transfer message */ + AMF_SESS_STORE_N2_TRANSFER( + sess, pdu_session_resource_setup_request, n2buf); - r = ngap_send_paging(amf_ue); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + r = ngap_send_paging(amf_ue); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else if (CM_CONNECTED(amf_ue)) { r = nas_send_pdu_session_setup_request(sess, NULL, n2buf); @@ -341,23 +336,18 @@ int amf_namf_comm_handle_n1_n2_message_transfer( sendmsg.http.location = ogs_sbi_server_uri(server, &header); - if (ogs_timer_running( - amf_ue->implicit_deregistration.timer) == true) { - ogs_warn("[%s] Paging failed. Stop", amf_ue->supi); - } else { - /* Store Paging Info */ - AMF_SESS_STORE_PAGING_INFO( - sess, sendmsg.http.location, NULL); + /* Store Paging Info */ + AMF_SESS_STORE_PAGING_INFO( + sess, sendmsg.http.location, NULL); - /* Store 5GSM Message */ - AMF_SESS_STORE_5GSM_MESSAGE(sess, - OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND, - n1buf, n2buf); + /* Store 5GSM Message */ + AMF_SESS_STORE_5GSM_MESSAGE(sess, + OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND, + n1buf, n2buf); - r = ngap_send_paging(amf_ue); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + r = ngap_send_paging(amf_ue); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else if (CM_CONNECTED(amf_ue)) { r = nas_send_pdu_session_modification_command(sess, n1buf, n2buf); diff --git a/src/amf/ngap-path.c b/src/amf/ngap-path.c index 4861034ca..c5247dd18 100644 --- a/src/amf/ngap-path.c +++ b/src/amf/ngap-path.c @@ -422,9 +422,6 @@ int ngap_send_paging(amf_ue_t *amf_ue) return OGS_NOTFOUND; } - ogs_assert(ogs_timer_running( - amf_ue->implicit_deregistration.timer) == false); - ogs_list_for_each(&amf_self()->gnb_list, gnb) { for (i = 0; i < gnb->num_of_supported_ta_list; i++) { for (j = 0; j < gnb->supported_ta_list[i].num_of_bplmn_list; j++) { diff --git a/src/mme/mme-s11-handler.c b/src/mme/mme-s11-handler.c index f52ce7ec1..a5562f9f6 100644 --- a/src/mme/mme-s11-handler.c +++ b/src/mme/mme-s11-handler.c @@ -919,28 +919,11 @@ void mme_s11_handle_create_bearer_request( if (OGS_FSM_CHECK(&default_bearer->sm, esm_state_active)) { if (ECM_IDLE(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon expiry of - * the mobile reachable timer is network dependent, but typically - * the network stops sending paging messages to the UE on the - * first expiry, and may take other appropriate actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timer expiry", - mme_ue->imsi_bcd); - - ogs_assert(OGS_OK == - mme_gtp_send_create_bearer_response( - bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE)); - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_CREATE_BEARER, bearer); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_CREATE_BEARER, bearer); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else { MME_CLEAR_PAGING_INFO(mme_ue); r = nas_eps_send_activate_dedicated_bearer_context_request(bearer); @@ -1070,28 +1053,11 @@ void mme_s11_handle_update_bearer_request( if (req->bearer_contexts.bearer_level_qos.presence == 1 || req->bearer_contexts.tft.presence == 1) { if (ECM_IDLE(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon expiry of - * the mobile reachable timer is network dependent, but typically - * the network stops sending paging messages to the UE on the - * first expiry, and may take other appropriate actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timer expiry", - mme_ue->imsi_bcd); - - ogs_assert(OGS_OK == - mme_gtp_send_update_bearer_response( - bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE)); - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_UPDATE_BEARER, bearer); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_UPDATE_BEARER, bearer); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else { MME_CLEAR_PAGING_INFO(mme_ue); r = nas_eps_send_modify_bearer_context_request(bearer, @@ -1228,28 +1194,11 @@ void mme_s11_handle_delete_bearer_request( bearer->delete.xact = xact; if (ECM_IDLE(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon expiry of - * the mobile reachable timer is network dependent, but typically - * the network stops sending paging messages to the UE on the - * first expiry, and may take other appropriate actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timer expiry", - mme_ue->imsi_bcd); - - ogs_assert(OGS_OK == - mme_gtp_send_delete_bearer_response( - bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE)); - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_DELETE_BEARER, bearer); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_DELETE_BEARER, bearer); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else { MME_CLEAR_PAGING_INFO(mme_ue); r = nas_eps_send_deactivate_bearer_context_request(bearer); @@ -1511,27 +1460,11 @@ void mme_s11_handle_downlink_data_notification( * before step 9, the MME shall not send S1 interface paging messages */ if (ECM_IDLE(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon expiry of - * the mobile reachable timer is network dependent, but typically - * the network stops sending paging messages to the UE on the - * first expiry, and may take other appropriate actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timer expiry", - mme_ue->imsi_bcd); - ogs_assert(OGS_OK == - mme_gtp_send_downlink_data_notification_ack( - bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE)); - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_DOWNLINK_DATA_NOTIFICATION, bearer); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_DOWNLINK_DATA_NOTIFICATION, bearer); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else if (ECM_CONNECTED(mme_ue)) { MME_CLEAR_PAGING_INFO(mme_ue); if (cause_value == OGS_GTP2_CAUSE_ERROR_INDICATION_RECEIVED) { diff --git a/src/mme/mme-s6a-handler.c b/src/mme/mme-s6a-handler.c index a38cebd64..e7b128ca8 100644 --- a/src/mme/mme-s6a-handler.c +++ b/src/mme/mme-s6a-handler.c @@ -261,29 +261,11 @@ void mme_s6a_handle_clr(mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message) * we need to check whether UE is IDLE or not. */ if (ECM_IDLE(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon expiry of - * the mobile reachable timer is network dependent, but typically - * the network stops sending paging messages to the UE on the - * first expiry, and may take other appropriate actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timer expiry", - mme_ue->imsi_bcd); - if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) { - ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue)); - } else { - mme_send_delete_session_or_detach(mme_ue); - } - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_DETACH_TO_UE, NULL); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_DETACH_TO_UE, NULL); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else { MME_CLEAR_PAGING_INFO(mme_ue); r = nas_eps_send_detach_request(mme_ue); diff --git a/src/mme/s1ap-path.c b/src/mme/s1ap-path.c index 15c7142dd..6b3b71028 100644 --- a/src/mme/s1ap-path.c +++ b/src/mme/s1ap-path.c @@ -419,8 +419,6 @@ int s1ap_send_paging(mme_ue_t *mme_ue, S1AP_CNDomain_t cn_domain) return OGS_NOTFOUND; } - ogs_assert(ogs_timer_running(mme_ue->t_implicit_detach.timer) == false); - /* Find enB with matched TAI */ ogs_list_for_each(&mme_self()->enb_list, enb) { for (i = 0; i < enb->num_of_supported_ta_list; i++) { diff --git a/src/mme/sgsap-handler.c b/src/mme/sgsap-handler.c index e227f72b2..2e4ef767d 100644 --- a/src/mme/sgsap-handler.c +++ b/src/mme/sgsap-handler.c @@ -387,55 +387,19 @@ void sgsap_handle_paging_request(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf) if (ECM_IDLE(mme_ue)) { if (CS_CALL_SERVICE_INDICATOR(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon - * expiry of the mobile reachable timer is network dependent, - * but typically the network stops sending paging messages to - * the UE on the first expiry, and may take other appropriate - * actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timeout", - mme_ue->imsi_bcd); - - ogs_assert(OGS_OK == - sgsap_send_paging_reject( - mme_ue, SGSAP_SGS_CAUSE_UE_UNREACHABLE)); - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - /* UE will respond Extended Service Request in PS CNDomain*/ - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_CS_CALL_SERVICE, NULL); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_cs); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + /* UE will respond Extended Service Request in PS CNDomain*/ + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_CS_CALL_SERVICE, NULL); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_cs); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else if (SMS_SERVICE_INDICATOR(mme_ue)) { - if (ogs_timer_running(mme_ue->t_implicit_detach.timer)) { - /* - * TS 24.301 5.3.7 - * If ISR is not activated, the network behaviour upon - * expiry of the mobile reachable timer is network dependent, - * but typically the network stops sending paging messages to - * the UE on the first expiry, and may take other appropriate - * actions - */ - ogs_debug("[%s] Paging stopped: Mobile Reachable timer expiry", - mme_ue->imsi_bcd); - - ogs_assert(OGS_OK == - sgsap_send_paging_reject( - mme_ue, SGSAP_SGS_CAUSE_UE_UNREACHABLE)); - MME_CLEAR_PAGING_INFO(mme_ue); - } else { - /* UE will respond Service Request in PS CNDomain*/ - MME_STORE_PAGING_INFO(mme_ue, - MME_PAGING_TYPE_SMS_SERVICE, NULL); - r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); - ogs_expect(r == OGS_OK); - ogs_assert(r != OGS_ERROR); - } + /* UE will respond Service Request in PS CNDomain*/ + MME_STORE_PAGING_INFO(mme_ue, + MME_PAGING_TYPE_SMS_SERVICE, NULL); + r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); } else goto paging_reject;