Commit 7423854f authored by Cedric Roux's avatar Cedric Roux

- Fix broken build when NAS disabled

- Fix compiler warning

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4636 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 05e4a9d2
...@@ -141,8 +141,10 @@ typedef struct nas_auth_param_fail_s { ...@@ -141,8 +141,10 @@ typedef struct nas_auth_param_fail_s {
nas_cause_t cause; nas_cause_t cause;
} nas_auth_param_fail_t; } nas_auth_param_fail_t;
#if defined(DISABLE_USE_NAS)
typedef struct nas_attach_accept_s { typedef struct nas_attach_accept_s {
s1ap_initial_ctxt_setup_req_t transparent;
} nas_attach_accept_t; } nas_attach_accept_t;
#endif
#endif /* NAS_MESSAGES_TYPES_H_ */ #endif /* NAS_MESSAGES_TYPES_H_ */
...@@ -211,7 +211,7 @@ int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p) ...@@ -211,7 +211,7 @@ int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p)
ue_context->eNB_ue_s1ap_id = attach_req_p->transparent.eNB_ue_s1ap_id; ue_context->eNB_ue_s1ap_id = attach_req_p->transparent.eNB_ue_s1ap_id;
ue_context->mme_ue_s1ap_id = attach_req_p->transparent.mme_ue_s1ap_id; ue_context->mme_ue_s1ap_id = attach_req_p->transparent.mme_ue_s1ap_id;
STAILQ_INIT(&ue_context->vector_list); // STAILQ_INIT(&ue_context->vector_list);
DevAssert(mme_insert_ue_context(&mme_app_desc.mme_ue_contexts, ue_context) == 0); DevAssert(mme_insert_ue_context(&mme_app_desc.mme_ue_contexts, ue_context) == 0);
goto request_auth; goto request_auth;
} else { } else {
...@@ -230,7 +230,8 @@ int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p) ...@@ -230,7 +230,8 @@ int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p)
} else { } else {
MME_APP_DEBUG("UE is not authenticated\n"); MME_APP_DEBUG("UE is not authenticated\n");
/* UE is not authenticated or an initial request */ /* UE is not authenticated or an initial request */
if (STAILQ_EMPTY(&ue_context->vector_list)) // if (STAILQ_EMPTY(&ue_context->vector_list))
if (ue_context->nb_of_vectors == 0)
request_auth: { request_auth: {
/* We have no vector for this UE, send an authentication request /* We have no vector for this UE, send an authentication request
* to the HSS. * to the HSS.
......
...@@ -78,10 +78,6 @@ void *mme_app_thread(void *args) ...@@ -78,10 +78,6 @@ void *mme_app_thread(void *args)
mme_app_handle_create_sess_resp(&received_message_p->ittiMsg.sgwCreateSessionResponse); mme_app_handle_create_sess_resp(&received_message_p->ittiMsg.sgwCreateSessionResponse);
} break; } break;
case NAS_AUTHENTICATION_PARAM_REQ: {
mme_app_handle_nas_auth_param_req(&received_message_p->ittiMsg.nas_auth_param_req);
} break;
#if defined(DISABLE_USE_NAS) #if defined(DISABLE_USE_NAS)
case NAS_ATTACH_REQ: { case NAS_ATTACH_REQ: {
mme_app_handle_attach_req(&received_message_p->ittiMsg.nas_attach_req); mme_app_handle_attach_req(&received_message_p->ittiMsg.nas_attach_req);
...@@ -90,8 +86,11 @@ void *mme_app_thread(void *args) ...@@ -90,8 +86,11 @@ void *mme_app_thread(void *args)
case NAS_AUTHENTICATION_RESP: { case NAS_AUTHENTICATION_RESP: {
mme_app_handle_nas_auth_resp(&received_message_p->ittiMsg.nas_auth_resp); mme_app_handle_nas_auth_resp(&received_message_p->ittiMsg.nas_auth_resp);
} break; } break;
#else
case NAS_AUTHENTICATION_PARAM_REQ: {
mme_app_handle_nas_auth_param_req(&received_message_p->ittiMsg.nas_auth_param_req);
} break;
#endif #endif
case TIMER_HAS_EXPIRED: { case TIMER_HAS_EXPIRED: {
/* Check if it is the statistic timer */ /* Check if it is the statistic timer */
if (received_message_p->ittiMsg.timer_has_expired.timer_id == if (received_message_p->ittiMsg.timer_has_expired.timer_id ==
......
...@@ -121,50 +121,52 @@ void esm_main_initialize(void) ...@@ -121,50 +121,52 @@ void esm_main_initialize(void)
/**************************************************************************** /****************************************************************************
** ** ** **
** Name: esm_main_cleanup() ** ** Name: esm_main_cleanup() **
** ** ** **
** Description: Performs the EPS Session Management clean up procedure ** ** Description: Performs the EPS Session Management clean up procedure **
** ** ** **
** Inputs: None ** ** Inputs: None **
** Others: None ** ** Others: None **
** ** ** **
** Outputs: None ** ** Outputs: None **
** Return: None ** ** Return: None **
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
void esm_main_cleanup(void) void esm_main_cleanup(void)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int i; #ifdef NAS_UE
int pid; {
int bid; int i;
int pid;
#ifdef NAS_UE int bid;
/* De-activate EPS bearers and clean up PDN connections */
for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) { /* De-activate EPS bearers and clean up PDN connections */
if (_esm_data.pdn[pid].data) { for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) {
esm_pdn_t *pdn = _esm_data.pdn[pid].data; if (_esm_data.pdn[pid].data) {
if (pdn->apn.length > 0) { esm_pdn_t *pdn = _esm_data.pdn[pid].data;
free(pdn->apn.value); if (pdn->apn.length > 0) {
} free(pdn->apn.value);
/* Release EPS bearer contexts */ }
for (bid = 0; bid < pdn->n_bearers; bid++) { /* Release EPS bearer contexts */
if (pdn->bearer[bid]) { for (bid = 0; bid < pdn->n_bearers; bid++) {
LOG_TRACE(WARNING, "ESM-MAIN - Release EPS bearer " if (pdn->bearer[bid]) {
"context (ebi=%d)", pdn->bearer[bid]->ebi); LOG_TRACE(WARNING, "ESM-MAIN - Release EPS bearer "
/* Delete the TFT */ "context (ebi=%d)", pdn->bearer[bid]->ebi);
for (i = 0; i < pdn->bearer[bid]->tft.n_pkfs; i++) { /* Delete the TFT */
if (pdn->bearer[bid]->tft.pkf[i]) { for (i = 0; i < pdn->bearer[bid]->tft.n_pkfs; i++) {
free(pdn->bearer[bid]->tft.pkf[i]); if (pdn->bearer[bid]->tft.pkf[i]) {
free(pdn->bearer[bid]->tft.pkf[i]);
}
} }
free(pdn->bearer[bid]);
} }
free(pdn->bearer[bid]);
} }
/* Release the PDN connection */
free(_esm_data.pdn[pid].data);
} }
/* Release the PDN connection */
free(_esm_data.pdn[pid].data);
} }
} }
#endif #endif
......
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