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 ==
......
...@@ -137,11 +137,12 @@ void esm_main_cleanup(void) ...@@ -137,11 +137,12 @@ void esm_main_cleanup(void)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
#ifdef NAS_UE
{
int i; int i;
int pid; int pid;
int bid; int bid;
#ifdef NAS_UE
/* De-activate EPS bearers and clean up PDN connections */ /* De-activate EPS bearers and clean up PDN connections */
for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) { for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) {
if (_esm_data.pdn[pid].data) { if (_esm_data.pdn[pid].data) {
...@@ -167,6 +168,7 @@ void esm_main_cleanup(void) ...@@ -167,6 +168,7 @@ void esm_main_cleanup(void)
free(_esm_data.pdn[pid].data); free(_esm_data.pdn[pid].data);
} }
} }
}
#endif #endif
LOG_FUNC_OUT; LOG_FUNC_OUT;
......
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