Commit 156d3bf5 authored by Frédéric Leroy's avatar Frédéric Leroy

UE/EMM: remove extern definitions for timers

parent 895e1d5b
...@@ -59,6 +59,7 @@ Description Defines the attach related EMM procedure executed by the ...@@ -59,6 +59,7 @@ Description Defines the attach related EMM procedure executed by the
#include "nas_timer.h" #include "nas_timer.h"
#include "emmData.h" #include "emmData.h"
#include "emm_timers.h"
#include "emm_sap.h" #include "emm_sap.h"
#include "esm_sap.h" #include "esm_sap.h"
...@@ -90,9 +91,7 @@ static const char *_emm_attach_type_str[] = { ...@@ -90,9 +91,7 @@ static const char *_emm_attach_type_str[] = {
/* /*
* Timer handlers * Timer handlers
*/ */
void *_emm_attach_t3410_handler(void *); static void *_emm_attach_t3411_handler(void *args);
static void *_emm_attach_t3411_handler(void *);
static void *_emm_attach_t3402_handler(void *);
/* /*
* Abnormal case attach procedure * Abnormal case attach procedure
...@@ -251,7 +250,7 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type) ...@@ -251,7 +250,7 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type)
} }
/* Start T3410 timer */ /* 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", LOG_TRACE(INFO,"EMM-PROC - Timer T3410 (%d) expires in %ld seconds",
emm_timers->T3410.id, emm_timers->T3410.sec); emm_timers->T3410.id, emm_timers->T3410.sec);
/* Stop T3402 and T3411 timers if running */ /* Stop T3402 and T3411 timers if running */
...@@ -991,7 +990,7 @@ int emm_proc_attach_set_detach(void *nas_user) ...@@ -991,7 +990,7 @@ int emm_proc_attach_set_detach(void *nas_user)
** Others: T3410 ** ** Others: T3410 **
** ** ** **
***************************************************************************/ ***************************************************************************/
void *_emm_attach_t3410_handler(void *args) void *emm_attach_t3410_handler(void *args)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
......
...@@ -59,9 +59,11 @@ Description Defines the authentication EMM procedure executed by the ...@@ -59,9 +59,11 @@ Description Defines the authentication EMM procedure executed by the
#include "nas_timer.h" #include "nas_timer.h"
#include "emmData.h" #include "emmData.h"
#include "emm_timers.h"
#include "emm_sap.h" #include "emm_sap.h"
#include "emm_cause.h" #include "emm_cause.h"
#include "emm_timers.h"
#include "usim_api.h" #include "usim_api.h"
#include "secu_defs.h" #include "secu_defs.h"
...@@ -72,15 +74,6 @@ Description Defines the authentication EMM procedure executed by the ...@@ -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 ****************/ /**************** 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; extern uint8_t usim_test;
/****************************************************************************/ /****************************************************************************/
...@@ -876,28 +869,28 @@ static int _authentication_start_timers(nas_user_t *user) ...@@ -876,28 +869,28 @@ static int _authentication_start_timers(nas_user_t *user)
if (authentication_data->timers & AUTHENTICATION_T3410) { if (authentication_data->timers & AUTHENTICATION_T3410) {
/* Start attach timer */ /* 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 " LOG_TRACE(INFO,"EMM-PROC - Timer T3410 (%d) expires in "
"%ld seconds", emm_timers->T3410.id, emm_timers->T3410.sec); "%ld seconds", emm_timers->T3410.id, emm_timers->T3410.sec);
} }
if (authentication_data->timers & AUTHENTICATION_T3417) { if (authentication_data->timers & AUTHENTICATION_T3417) {
/* Start service request timer */ /* 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 " LOG_TRACE(INFO,"EMM-PROC - Timer T3417 (%d) expires in "
"%ld seconds", emm_timers->T3417.id, emm_timers->T3417.sec); "%ld seconds", emm_timers->T3417.id, emm_timers->T3417.sec);
} }
if (authentication_data->timers & AUTHENTICATION_T3421) { if (authentication_data->timers & AUTHENTICATION_T3421) {
/* Start detach timer */ /* 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 " LOG_TRACE(INFO,"EMM-PROC - Timer T3421 (%d) expires in "
"%ld seconds", emm_timers->T3421.id, emm_timers->T3421.sec); "%ld seconds", emm_timers->T3421.id, emm_timers->T3421.sec);
} }
if (authentication_data->timers & AUTHENTICATION_T3430) { if (authentication_data->timers & AUTHENTICATION_T3430) {
/* Start tracking area update timer */ /* 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 " LOG_TRACE(INFO,"EMM-PROC - Timer T3430 (%d) expires in "
"%ld seconds", emm_timers->T3430.id, emm_timers->T3430.sec); "%ld seconds", emm_timers->T3430.id, emm_timers->T3430.sec);
} }
......
...@@ -49,6 +49,7 @@ Description Defines the detach related EMM procedure executed by the ...@@ -49,6 +49,7 @@ Description Defines the detach related EMM procedure executed by the
#include "nas_timer.h" #include "nas_timer.h"
#include "emmData.h" #include "emmData.h"
#include "emm_timers.h"
#include "emm_sap.h" #include "emm_sap.h"
#include "esm_sap.h" #include "esm_sap.h"
...@@ -75,10 +76,6 @@ static const char *_emm_detach_type_str[] = { ...@@ -75,10 +76,6 @@ static const char *_emm_detach_type_str[] = {
* Internal data handled by the detach procedure in the UE * Internal data handled by the detach procedure in the UE
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/*
* Timer handlers
*/
void *_emm_detach_t3421_handler(void *);
/* /*
* Abnormal case detach procedures * Abnormal case detach procedures
...@@ -196,7 +193,7 @@ int emm_proc_detach_request(void *args) ...@@ -196,7 +193,7 @@ int emm_proc_detach_request(void *args)
if ( !emm_detach_data->switch_off ) { if ( !emm_detach_data->switch_off ) {
/* Start T3421 timer */ /* 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", LOG_TRACE(INFO, "EMM-PROC - Timer T3421 (%d) expires in %ld seconds",
emm_timers->T3421.id, emm_timers->T3421.sec); emm_timers->T3421.id, emm_timers->T3421.sec);
} }
...@@ -372,7 +369,7 @@ int emm_proc_detach_release(void *args) ...@@ -372,7 +369,7 @@ int emm_proc_detach_release(void *args)
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
void *_emm_detach_t3421_handler(void *args) void *emm_detach_t3421_handler(void *args)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
...@@ -419,7 +416,7 @@ void *_emm_detach_t3421_handler(void *args) ...@@ -419,7 +416,7 @@ void *_emm_detach_t3421_handler(void *args)
if (rc != RETURNerror) { if (rc != RETURNerror) {
/* Start T3421 timer */ /* 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 " LOG_TRACE(INFO, "EMM-PROC - Timer T3421 (%d) expires in %ld "
"seconds", emm_timers->T3421.id, emm_timers->T3421.sec); "seconds", emm_timers->T3421.id, emm_timers->T3421.sec);
} }
......
...@@ -67,11 +67,6 @@ Description Defines the service request EMM procedure executed by the ...@@ -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 * 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 * Internal data handled by the service request procedure in the MME
...@@ -109,7 +104,7 @@ void *_emm_service_t3417_handler(void *); ...@@ -109,7 +104,7 @@ void *_emm_service_t3417_handler(void *);
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
void *_emm_service_t3417_handler(void *args) void *emm_service_t3417_handler(void *args)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
nas_user_t *user = args; nas_user_t *user = args;
......
...@@ -67,10 +67,6 @@ Description Defines the tracking area update EMM procedure executed by the ...@@ -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 * 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 *); ...@@ -110,7 +106,7 @@ void *_emm_tau_t3430_handler(void *);
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
void *_emm_tau_t3430_handler(void *args) void *emm_tau_t3430_handler(void *args)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
nas_user_t *user = args; nas_user_t *user = args;
......
#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
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "emmData.h" #include "emmData.h"
#include "esmData.h" #include "esmData.h"
// FIXME don't work for reentrant calls
char ip_addr_str[100]; char ip_addr_str[100];
inline char *esm_data_get_ipv4_addr(const OctetString *ip_addr) inline char *esm_data_get_ipv4_addr(const OctetString *ip_addr)
......
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