Commit c21625f8 authored by Frédéric Leroy's avatar Frédéric Leroy

UE/EMM: fix emm_proc_lowerlayer_* prototype

parent 48108216
......@@ -240,7 +240,7 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type)
if (rc != RETURNerror) {
/* Setup EMM procedure handler to be executed upon receiving
* lower layer notification */
rc = emm_proc_lowerlayer_initialize(emm_proc_attach_request,
rc = emm_proc_lowerlayer_initialize(user->lowerlayer_data, emm_proc_attach_request,
emm_proc_attach_failure,
emm_proc_attach_release, user);
......@@ -423,7 +423,7 @@ int emm_proc_attach_accept(nas_user_t *user, long t3412, long t3402, long t3423,
if ( (rc != RETURNerror) && (esm_sap.err == ESM_SAP_SUCCESS) ) {
/* Setup EMM procedure handler to be executed upon receiving
* lower layer notification */
rc = emm_proc_lowerlayer_initialize(emm_proc_attach_complete,
rc = emm_proc_lowerlayer_initialize(user->lowerlayer_data, emm_proc_attach_complete,
emm_proc_attach_failure,
NULL, user);
......@@ -721,7 +721,7 @@ int emm_proc_attach_complete(void *args)
LOG_TRACE(INFO, "EMM-PROC - EPS attach complete");
/* Reset EMM procedure handler */
(void) emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
/* Reset the attach attempt counter */
emm_attach_data->attempt_count = 0;
......@@ -787,7 +787,7 @@ int emm_proc_attach_failure(int is_initial, void *args)
LOG_TRACE(WARNING, "EMM-PROC - EPS attach failure");
/* Reset EMM procedure handler */
(void) emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
/* Stop timer T3410 if still running */
if (emm_timers->T3410.id != NAS_TIMER_INACTIVE_ID) {
......
......@@ -289,7 +289,7 @@ int emm_proc_authentication_request(nas_user_t *user, int native_ksi, int ksi,
/* Setup EMM procedure handler to be executed upon receiving
* lower layer notification */
rc = emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
rc = emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
if (rc != RETURNok) {
LOG_TRACE(WARNING,
......
......@@ -132,7 +132,7 @@ int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, int switch_of
/* Setup EMM procedure handler to be executed upon receiving
* lower layer notification */
rc = emm_proc_lowerlayer_initialize(emm_proc_detach_request,
rc = emm_proc_lowerlayer_initialize(user->lowerlayer_data, emm_proc_detach_request,
emm_proc_detach_failure,
emm_proc_detach_release, user);
......@@ -240,7 +240,7 @@ int emm_proc_detach_accept(void* args)
LOG_TRACE(INFO, "EMM-PROC - UE initiated detach procedure completion");
/* Reset EMM procedure handler */
(void) emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
(void) emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
/* Stop timer T3421 */
emm_timers->T3421.id = nas_timer_stop(emm_timers->T3421.id);
......@@ -292,7 +292,7 @@ int emm_proc_detach_failure(int is_initial, void *args)
LOG_TRACE(WARNING, "EMM-PROC - Network detach failure");
/* Reset EMM procedure handler */
(void) emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
(void) emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
/* Stop timer T3421 */
emm_timers->T3421.id = nas_timer_stop(emm_timers->T3421.id);
......@@ -458,7 +458,7 @@ static int _emm_detach_abort(nas_user_t *user, emm_proc_detach_type_t type)
LOG_TRACE(WARNING, "EMM-PROC - Abort the detach procedure");
/* Reset EMM procedure handler */
(void) emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
/* Stop timer T3421 */
emm_timers->T3421.id = nas_timer_stop(emm_timers->T3421.id);
......
......@@ -115,7 +115,7 @@ int emm_proc_identification_request(nas_user_t *user, emm_proc_identity_type_t t
/* Setup EMM procedure handler to be executed upon receiving
* lower layer notification */
rc = emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
rc = emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
if (rc != RETURNok) {
LOG_TRACE(WARNING,
......
......@@ -62,6 +62,20 @@ Description Defines EMM procedures executed by the Non-Access Stratum
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
/*
*---------------------------------------------------------------------------
* Lower layer procedure
*---------------------------------------------------------------------------
*/
int emm_proc_lowerlayer_initialize(lowerlayer_data_t *lowerlayer_data, lowerlayer_success_callback_t success,
lowerlayer_failure_callback_t failure,
lowerlayer_release_callback_t release,
void *args);
int emm_proc_lowerlayer_success(lowerlayer_data_t *lowerlayer_data);
int emm_proc_lowerlayer_failure(lowerlayer_data_t *lowerlayer_data, int is_initial);
int emm_proc_lowerlayer_release(lowerlayer_data_t *lowerlayer_data);
int lowerlayer_success(nas_user_t *user);
int lowerlayer_failure(nas_user_t *user);
int lowerlayer_establish(nas_user_t *user);
......
......@@ -113,14 +113,14 @@ int EmmDeregisteredAttemptingToAttach(nas_user_t *user, const emm_reg_t *evt)
/*
* Data successfully delivered to the network
*/
rc = emm_proc_lowerlayer_success();
rc = emm_proc_lowerlayer_success(user->lowerlayer_data);
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(FALSE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
break;
default:
......
......@@ -124,7 +124,7 @@ int EmmDeregisteredInitiated(nas_user_t *user, const emm_reg_t *evt)
* before the Detach Accept is received
*/
// FIXME review
rc = emm_proc_lowerlayer_release();
rc = emm_proc_lowerlayer_release(user->lowerlayer_data);
break;
default:
......
......@@ -126,21 +126,21 @@ int EmmDeregisteredLimitedService(nas_user_t *user, const emm_reg_t *evt)
* Initial NAS message has been successfully delivered
* to the network
*/
rc = emm_proc_lowerlayer_success();
rc = emm_proc_lowerlayer_success(user->lowerlayer_data);
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(TRUE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, TRUE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
rc = emm_proc_lowerlayer_release(user->lowerlayer_data);
break;
default:
......
......@@ -134,21 +134,21 @@ int EmmDeregisteredNormalService(nas_user_t *user, const emm_reg_t *evt)
* Initial NAS message has been successfully delivered
* to the network
*/
rc = emm_proc_lowerlayer_success();
rc = emm_proc_lowerlayer_success(user->lowerlayer_data);
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(TRUE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, TRUE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
rc = emm_proc_lowerlayer_release(user->lowerlayer_data);
break;
case _EMMREG_ATTACH_CNF:
......
......@@ -136,21 +136,21 @@ int EmmRegistered(nas_user_t *user, const emm_reg_t *evt)
/*
* Data transfer message has been successfully delivered
*/
rc = emm_proc_lowerlayer_success();
rc = emm_proc_lowerlayer_success(user->lowerlayer_data);
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data transfer message failed to be delivered
*/
rc = emm_proc_lowerlayer_failure(FALSE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
rc = emm_proc_lowerlayer_release(user->lowerlayer_data);
break;
default:
......
......@@ -230,7 +230,7 @@ int EmmRegisteredInitiated(nas_user_t *user, const emm_reg_t *evt)
* any message transfered by EMM common procedures requested
* by the network.
*/
rc = emm_proc_lowerlayer_success();
rc = emm_proc_lowerlayer_success(user->lowerlayer_data);
break;
case _EMMREG_LOWERLAYER_FAILURE:
......@@ -240,7 +240,7 @@ int EmmRegisteredInitiated(nas_user_t *user, const emm_reg_t *evt)
* any message transfered by EMM common procedures requested
* by the network.
*/
rc = emm_proc_lowerlayer_failure(FALSE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
......@@ -249,7 +249,7 @@ int EmmRegisteredInitiated(nas_user_t *user, const emm_reg_t *evt)
* Accept, Attach Reject, or any message transfered by EMM common
* procedures requested by the network, is received.
*/
rc = emm_proc_lowerlayer_release();
rc = emm_proc_lowerlayer_release(user->lowerlayer_data);
break;
default:
......
......@@ -308,7 +308,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
/* Setup EMM procedure handler to be executed upon receiving
* lower layer notification */
rc = emm_proc_lowerlayer_initialize(NULL, NULL, NULL, NULL);
rc = emm_proc_lowerlayer_initialize(user->lowerlayer_data, NULL, NULL, NULL, NULL);
if (rc != RETURNok) {
LOG_TRACE(WARNING,
......
......@@ -68,19 +68,6 @@ Description Defines the EPS Mobility Management procedures executed at
int emm_proc_status_ind(unsigned int ueid, int emm_cause);
int emm_proc_status(nas_user_t *user, int emm_cause);
/*
*---------------------------------------------------------------------------
* Lower layer procedure
*---------------------------------------------------------------------------
*/
int emm_proc_lowerlayer_initialize(lowerlayer_success_callback_t success,
lowerlayer_failure_callback_t failure,
lowerlayer_release_callback_t release,
void *args);
int emm_proc_lowerlayer_success(void);
int emm_proc_lowerlayer_failure(int is_initial);
int emm_proc_lowerlayer_release(void);
/*
*---------------------------------------------------------------------------
* UE's Idle mode procedure
......
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