UE/*: exit on error
This commit is contained in:
@@ -109,7 +109,7 @@ void IdleMode_initialize(nas_user_t *user, IdleMode_callback_t cb)
|
||||
emm_plmn_list_t *emm_plmn_list = calloc(1, sizeof(emm_plmn_list_t));
|
||||
if ( emm_plmn_list == NULL ) {
|
||||
LOG_TRACE(ERROR, "EMM - Can't alloc emm_plmn_list");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
user->emm_plmn_list = emm_plmn_list;
|
||||
/* Initialize the list of available PLMNs */
|
||||
|
||||
@@ -137,7 +137,7 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
|
||||
user->emm_data = calloc(1, sizeof(emm_data_t));
|
||||
if ( user->emm_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "EMM-MAIN - Failed to get allocate emm_data");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/* USIM validity indicator */
|
||||
user->emm_data->usim_is_valid = FALSE;
|
||||
@@ -400,7 +400,7 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
|
||||
user->emm_data->emm_timers = calloc(1, sizeof(emm_timers_t));
|
||||
if ( user->emm_data->emm_timers == NULL ) {
|
||||
LOG_TRACE(ERROR, "EMM-MAIN - Failed to alloc emm_timers");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
_emm_timers_initialize(user->emm_data->emm_timers);
|
||||
|
||||
@@ -410,7 +410,7 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
|
||||
user->emm_data->emm_detach_data = calloc(1, sizeof(emm_detach_data_t));
|
||||
if ( user->emm_data->emm_detach_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "EMM-MAIN - Failed to alloc emm_timers");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
_emm_detach_initialize(user->emm_data->emm_detach_data);
|
||||
|
||||
@@ -420,7 +420,7 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
|
||||
user->emm_data->emm_attach_data = calloc(1, sizeof(emm_attach_data_t));
|
||||
if ( user->emm_data->emm_attach_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "EMM-MAIN - Failed to alloc emm_timers");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
_emm_attach_initialize(user->emm_data->emm_attach_data);
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ esm_ebr_data_t *esm_ebr_initialize(void)
|
||||
|
||||
if ( esm_ebr_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "ESM-EBR - Can't malloc esm_ebr_data");
|
||||
// FIXME Stop here !!!
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
esm_ebr_data->index = 0;
|
||||
|
||||
@@ -81,14 +81,14 @@ void esm_main_initialize(nas_user_t *user, esm_indication_callback_t cb)
|
||||
esm_data_t *esm_data = calloc(1, sizeof(esm_data_t));
|
||||
if ( esm_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "ESM-MAIN - Can't malloc esm_data");
|
||||
// FIXME Stop here !!!
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
user->esm_data = esm_data;
|
||||
|
||||
default_eps_bearer_context_data_t *default_eps_bearer_context = calloc(1, sizeof(default_eps_bearer_context_data_t));
|
||||
if ( default_eps_bearer_context == NULL ) {
|
||||
LOG_TRACE(ERROR, "ESM-MAIN - Can't malloc default_eps_bearer_context");
|
||||
// FIXME Stop here !!!
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
default_eps_bearer_context->ebi = ESM_EBI_UNASSIGNED;
|
||||
user->default_eps_bearer_context_data = default_eps_bearer_context;
|
||||
|
||||
@@ -89,7 +89,7 @@ esm_pt_data_t *esm_pt_initialize(void)
|
||||
|
||||
if ( esm_pt_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "ESM-PT - Can't alloc esm_pt_data");
|
||||
// FIXME Stop here !!!
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
esm_pt_data->index = 0;
|
||||
|
||||
@@ -100,13 +100,13 @@ void nas_proc_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
|
||||
user->authentication_data = calloc(1, sizeof(authentication_data_t));
|
||||
if ( user->authentication_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "NAS-PROC - Failed to alloc authentication_data");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
user->security_data = calloc(1, sizeof(security_data_t));
|
||||
if ( user->security_data == NULL ) {
|
||||
LOG_TRACE(ERROR, "NAS-PROC - Failed to alloc security_data");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Initialize the EMM procedure manager */
|
||||
|
||||
@@ -83,7 +83,7 @@ void *nas_ue_task(void *args_p)
|
||||
|
||||
if (user_api_id == NULL) {
|
||||
LOG_E(NAS, "[UE] Failed to alloc user_api_id_t");
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
user->user_api_id = user_api_id;
|
||||
@@ -100,13 +100,13 @@ void *nas_ue_task(void *args_p)
|
||||
user->user_at_commands = calloc(1, sizeof(user_at_commands_t));
|
||||
if ( user->user_at_commands == NULL ) {
|
||||
LOG_E(NAS, "[UE %d] Can't allocate memory for user_at_commands\n", 0);
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
user->at_response = calloc(1, sizeof(at_response_t));
|
||||
if ( user->at_response == NULL ) {
|
||||
LOG_E(NAS, "[UE %d] Can't allocate memory for user_at_commands\n", 0);
|
||||
// FIXME stop here
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Initialize NAS user */
|
||||
|
||||
@@ -161,8 +161,7 @@ void nas_user_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
|
||||
user->nas_user_nvdata = calloc(1, sizeof(user_nvdata_t));
|
||||
if ( user->nas_user_nvdata == NULL ) {
|
||||
LOG_TRACE(ERROR, "USR-MAIN - Failed to alloc nas_user_nvdata");
|
||||
// FIXME stop here
|
||||
return;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Get UE's data pathname */
|
||||
@@ -170,8 +169,7 @@ void nas_user_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
|
||||
|
||||
if (path == NULL) {
|
||||
LOG_TRACE(ERROR, "USR-MAIN - Failed to get UE's data pathname");
|
||||
// FIXME return an error code or exit
|
||||
return;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Get UE data stored in the non-volatile memory device */
|
||||
@@ -184,8 +182,7 @@ void nas_user_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
|
||||
user->nas_user_context = calloc(1, sizeof(nas_user_context_t));
|
||||
if ( user->nas_user_context == NULL ) {
|
||||
LOG_TRACE(ERROR, "USR-MAIN - Failed to alloc nas_user_context");
|
||||
// FIXME stop here
|
||||
return;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
_nas_user_context_initialize(user->nas_user_context, version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user