diff --git a/openair3/NAS/UE/EMM/Attach.c b/openair3/NAS/UE/EMM/Attach.c index b47b8cea8b5cfc4bc8c8c9742f8423026a36d89f..12be189d9bcdbe7b64fe5dad88830d92b6c14563 100644 --- a/openair3/NAS/UE/EMM/Attach.c +++ b/openair3/NAS/UE/EMM/Attach.c @@ -59,6 +59,7 @@ Description Defines the attach related EMM procedure executed by the #include "nas_timer.h" #include "emmData.h" +#include "emm_timers.h" #include "emm_sap.h" #include "esm_sap.h" @@ -90,9 +91,7 @@ static const char *_emm_attach_type_str[] = { /* * Timer handlers */ -void *_emm_attach_t3410_handler(void *); -static void *_emm_attach_t3411_handler(void *); -static void *_emm_attach_t3402_handler(void *); +static void *_emm_attach_t3411_handler(void *args); /* * Abnormal case attach procedure @@ -251,7 +250,7 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type) } /* Start T3410 timer */ - emm_timers->T3410.id = nas_timer_start(emm_timers->T3410.sec, _emm_attach_t3410_handler, user); + emm_timers->T3410.id = nas_timer_start(emm_timers->T3410.sec, emm_attach_t3410_handler, user); LOG_TRACE(INFO,"EMM-PROC - Timer T3410 (%d) expires in %ld seconds", emm_timers->T3410.id, emm_timers->T3410.sec); /* Stop T3402 and T3411 timers if running */ @@ -991,7 +990,7 @@ int emm_proc_attach_set_detach(void *nas_user) ** Others: T3410 ** ** ** ***************************************************************************/ -void *_emm_attach_t3410_handler(void *args) +void *emm_attach_t3410_handler(void *args) { LOG_FUNC_IN; diff --git a/openair3/NAS/UE/EMM/Authentication.c b/openair3/NAS/UE/EMM/Authentication.c index cee8553113aa0be133f1695d1d221ad47e260011..cb448388f7293ed41ac7a6b101ad64e22e708f27 100644 --- a/openair3/NAS/UE/EMM/Authentication.c +++ b/openair3/NAS/UE/EMM/Authentication.c @@ -59,9 +59,11 @@ Description Defines the authentication EMM procedure executed by the #include "nas_timer.h" #include "emmData.h" +#include "emm_timers.h" #include "emm_sap.h" #include "emm_cause.h" +#include "emm_timers.h" #include "usim_api.h" #include "secu_defs.h" @@ -72,15 +74,6 @@ Description Defines the authentication EMM procedure executed by the /**************** E X T E R N A L D E F I N I T I O N S ****************/ /****************************************************************************/ -/* - * Retransmission timer handlers - */ -// FIXME REVIEW -extern void *_emm_attach_t3410_handler(void *); -extern void *_emm_service_t3417_handler(void *); -extern void *_emm_detach_t3421_handler(void *); -extern void *_emm_tau_t3430_handler(void *); - extern uint8_t usim_test; /****************************************************************************/ @@ -876,28 +869,28 @@ static int _authentication_start_timers(nas_user_t *user) if (authentication_data->timers & AUTHENTICATION_T3410) { /* Start attach timer */ - emm_timers->T3410.id = nas_timer_start(emm_timers->T3410.sec, _emm_attach_t3410_handler, NULL); + emm_timers->T3410.id = nas_timer_start(emm_timers->T3410.sec, emm_attach_t3410_handler, NULL); LOG_TRACE(INFO,"EMM-PROC - Timer T3410 (%d) expires in " "%ld seconds", emm_timers->T3410.id, emm_timers->T3410.sec); } if (authentication_data->timers & AUTHENTICATION_T3417) { /* Start service request timer */ - emm_timers->T3417.id = nas_timer_start(emm_timers->T3417.sec, _emm_service_t3417_handler, NULL); + emm_timers->T3417.id = nas_timer_start(emm_timers->T3417.sec, emm_service_t3417_handler, NULL); LOG_TRACE(INFO,"EMM-PROC - Timer T3417 (%d) expires in " "%ld seconds", emm_timers->T3417.id, emm_timers->T3417.sec); } if (authentication_data->timers & AUTHENTICATION_T3421) { /* Start detach timer */ - emm_timers->T3421.id = nas_timer_start(emm_timers->T3421.sec, _emm_detach_t3421_handler, NULL); + emm_timers->T3421.id = nas_timer_start(emm_timers->T3421.sec, emm_detach_t3421_handler, NULL); LOG_TRACE(INFO,"EMM-PROC - Timer T3421 (%d) expires in " "%ld seconds", emm_timers->T3421.id, emm_timers->T3421.sec); } if (authentication_data->timers & AUTHENTICATION_T3430) { /* Start tracking area update timer */ - emm_timers->T3430.id = nas_timer_start(emm_timers->T3430.sec, _emm_tau_t3430_handler, NULL); + emm_timers->T3430.id = nas_timer_start(emm_timers->T3430.sec, emm_tau_t3430_handler, NULL); LOG_TRACE(INFO,"EMM-PROC - Timer T3430 (%d) expires in " "%ld seconds", emm_timers->T3430.id, emm_timers->T3430.sec); } diff --git a/openair3/NAS/UE/EMM/Detach.c b/openair3/NAS/UE/EMM/Detach.c index 44fbe951819b949ceeda8f5a8b70658f70356483..58148205a3a6def5830315f26b97ffc4f095c472 100644 --- a/openair3/NAS/UE/EMM/Detach.c +++ b/openair3/NAS/UE/EMM/Detach.c @@ -49,6 +49,7 @@ Description Defines the detach related EMM procedure executed by the #include "nas_timer.h" #include "emmData.h" +#include "emm_timers.h" #include "emm_sap.h" #include "esm_sap.h" @@ -75,10 +76,6 @@ static const char *_emm_detach_type_str[] = { * Internal data handled by the detach procedure in the UE * -------------------------------------------------------------------------- */ -/* - * Timer handlers - */ -void *_emm_detach_t3421_handler(void *); /* * Abnormal case detach procedures @@ -196,7 +193,7 @@ int emm_proc_detach_request(void *args) if ( !emm_detach_data->switch_off ) { /* Start T3421 timer */ - emm_timers->T3421.id = nas_timer_start(emm_timers->T3421.sec, _emm_detach_t3421_handler, user); + emm_timers->T3421.id = nas_timer_start(emm_timers->T3421.sec, emm_detach_t3421_handler, user); LOG_TRACE(INFO, "EMM-PROC - Timer T3421 (%d) expires in %ld seconds", emm_timers->T3421.id, emm_timers->T3421.sec); } @@ -372,7 +369,7 @@ int emm_proc_detach_release(void *args) ** Others: None ** ** ** ***************************************************************************/ -void *_emm_detach_t3421_handler(void *args) +void *emm_detach_t3421_handler(void *args) { LOG_FUNC_IN; @@ -419,7 +416,7 @@ void *_emm_detach_t3421_handler(void *args) if (rc != RETURNerror) { /* Start T3421 timer */ - emm_timers->T3421.id = nas_timer_start(emm_timers->T3421.sec, _emm_detach_t3421_handler, user); + emm_timers->T3421.id = nas_timer_start(emm_timers->T3421.sec, emm_detach_t3421_handler, user); LOG_TRACE(INFO, "EMM-PROC - Timer T3421 (%d) expires in %ld " "seconds", emm_timers->T3421.id, emm_timers->T3421.sec); } diff --git a/openair3/NAS/UE/EMM/ServiceRequestHdl.c b/openair3/NAS/UE/EMM/ServiceRequestHdl.c index 65df01b114a82abb008e9f63a264297582d2393d..93e66efdbdb2ae7ad387403fa58f60f08d745204 100644 --- a/openair3/NAS/UE/EMM/ServiceRequestHdl.c +++ b/openair3/NAS/UE/EMM/ServiceRequestHdl.c @@ -67,11 +67,6 @@ Description Defines the service request EMM procedure executed by the * Internal data handled by the service request procedure in the UE * -------------------------------------------------------------------------- */ -/* - * Timer handlers - */ -void *_emm_service_t3417_handler(void *); - /* * -------------------------------------------------------------------------- * Internal data handled by the service request procedure in the MME @@ -109,7 +104,7 @@ void *_emm_service_t3417_handler(void *); ** Others: None ** ** ** ***************************************************************************/ -void *_emm_service_t3417_handler(void *args) +void *emm_service_t3417_handler(void *args) { LOG_FUNC_IN; nas_user_t *user = args; diff --git a/openair3/NAS/UE/EMM/TrackingAreaUpdate.c b/openair3/NAS/UE/EMM/TrackingAreaUpdate.c index 5fe732b22d2e65cfd2ff8e7c7349f703308de462..bafddaf31739edf8f07cab807fb92215f91e73e6 100644 --- a/openair3/NAS/UE/EMM/TrackingAreaUpdate.c +++ b/openair3/NAS/UE/EMM/TrackingAreaUpdate.c @@ -67,10 +67,6 @@ Description Defines the tracking area update EMM procedure executed by the * Internal data handled by the tracking area update procedure in the UE * -------------------------------------------------------------------------- */ -/* - * Timer handlers - */ -void *_emm_tau_t3430_handler(void *); /* * -------------------------------------------------------------------------- @@ -110,7 +106,7 @@ void *_emm_tau_t3430_handler(void *); ** Others: None ** ** ** ***************************************************************************/ -void *_emm_tau_t3430_handler(void *args) +void *emm_tau_t3430_handler(void *args) { LOG_FUNC_IN; nas_user_t *user = args; diff --git a/openair3/NAS/UE/EMM/emm_timers.h b/openair3/NAS/UE/EMM/emm_timers.h new file mode 100644 index 0000000000000000000000000000000000000000..abf7c9ff87411aa362e1e4141af4adeab4d0fbd8 --- /dev/null +++ b/openair3/NAS/UE/EMM/emm_timers.h @@ -0,0 +1,14 @@ +#ifndef EMM_TIMERS_H +#define EMM_TIMERS_H + +/* + * Retransmission timer handlers + */ + +void *emm_attach_t3410_handler(void *); +void *emm_service_t3417_handler(void *); +void *emm_detach_t3421_handler(void *); +void *emm_tau_t3430_handler(void *); + + +#endif diff --git a/openair3/NAS/UE/ESM/esm_ip.c b/openair3/NAS/UE/ESM/esm_ip.c index f21305a1a0ca9c1862b4cec94fb0ac879d58f392..23d8ecce97708a1078ffaa815ce3440aec7276d9 100644 --- a/openair3/NAS/UE/ESM/esm_ip.c +++ b/openair3/NAS/UE/ESM/esm_ip.c @@ -22,6 +22,7 @@ #include "emmData.h" #include "esmData.h" +// FIXME don't work for reentrant calls char ip_addr_str[100]; inline char *esm_data_get_ipv4_addr(const OctetString *ip_addr)