Files
openairinterface5g/openair2/M2AP/m2ap_timers.c
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

88 lines
2.5 KiB
C

/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include "m2ap_timers.h"
#include "assertions.h"
#include "m2ap_messages_types.h"
#include "m2ap_eNB_defs.h"
#include "m2ap_ids.h"
#include "m2ap_eNB_management_procedures.h"
#include "m2ap_eNB_generate_messages.h"
void m2ap_timers_init(m2ap_timers_t *t, int t_reloc_prep, int tm2_reloc_overall)
{
t->tti = 0;
t->t_reloc_prep = t_reloc_prep;
t->tm2_reloc_overall = tm2_reloc_overall;
}
void m2ap_check_timers(instance_t instance)
{
//m2ap_eNB_instance_t *instance_p;
//m2ap_timers_t *t;
//m2ap_id_manager *m;
//int i;
//m2ap_handover_cancel_cause_t cause;
//void *target;
//MessageDef *msg;
//int m2_ongoing;
//instance_p = m2ap_eNB_get_instance(instance);
//DevAssert(instance_p != NULL);
//t = &instance_p->timers;
//m = &instance_p->id_manager;
///* increment subframe count */
//t->tti++;
//m2_ongoing = 0;
//for (i = 0; i < M2AP_MAX_IDS; i++) {
// if (m->ids[i].rnti == -1) continue;
// m2_ongoing++;
// if (m->ids[i].state == M2ID_STATE_SOURCE_PREPARE &&
// t->tti > m->ids[i].t_reloc_prep_start + t->t_reloc_prep) {
// LOG_I(M2AP, "M2 timeout reloc prep\n");
// /* t_reloc_prep timed out */
// cause = M2AP_T_RELOC_PREP_TIMEOUT;
// goto timeout;
// }
// if (m->ids[i].state == M2ID_STATE_SOURCE_OVERALL &&
// t->tti > m->ids[i].tm2_reloc_overall_start + t->tm2_reloc_overall) {
// LOG_I(M2AP, "M2 timeout reloc overall\n");
// /* tm2_reloc_overall timed out */
// cause = M2AP_TM2_RELOC_OVERALL_TIMEOUT;
// goto timeout;
// }
// /* no timeout -> check next UE */
// continue;
// timeout:
// /* inform target about timeout */
// target = m2ap_id_get_target(m, i);
// m2ap_eNB_generate_m2_handover_cancel(instance_p, target, i, cause);
// /* inform RRC of cancellation */
// msg = itti_alloc_new_message(TASK_M2AP, M2AP_HANDOVER_CANCEL);
// M2AP_HANDOVER_CANCEL(msg).rnti = m2ap_id_get_rnti(m, i);
// M2AP_HANDOVER_CANCEL(msg).cause = cause;
// itti_send_msg_to_task(TASK_RRC_ENB, instance_p->instance, msg);
// /* remove UE from M2AP */
// m2ap_release_id(m, i);
//}
//if (m2_ongoing && t->tti % 1000 == 0)
// LOG_I(M2AP, "M2 has %d process ongoing\n", m2_ongoing);
}
uint64_t m2ap_timer_get_tti(m2ap_timers_t *t)
{
return t->tti;
}