- Fix broken build when NAS disabled
- Fix compiler warning git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4636 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -141,8 +141,10 @@ typedef struct nas_auth_param_fail_s {
|
||||
nas_cause_t cause;
|
||||
} nas_auth_param_fail_t;
|
||||
|
||||
#if defined(DISABLE_USE_NAS)
|
||||
typedef struct nas_attach_accept_s {
|
||||
|
||||
s1ap_initial_ctxt_setup_req_t transparent;
|
||||
} nas_attach_accept_t;
|
||||
#endif
|
||||
|
||||
#endif /* NAS_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -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->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);
|
||||
goto request_auth;
|
||||
} else {
|
||||
@@ -230,7 +230,8 @@ int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p)
|
||||
} else {
|
||||
MME_APP_DEBUG("UE is not authenticated\n");
|
||||
/* 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: {
|
||||
/* We have no vector for this UE, send an authentication request
|
||||
* to the HSS.
|
||||
|
||||
@@ -78,10 +78,6 @@ void *mme_app_thread(void *args)
|
||||
mme_app_handle_create_sess_resp(&received_message_p->ittiMsg.sgwCreateSessionResponse);
|
||||
} 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)
|
||||
case 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)
|
||||
case NAS_AUTHENTICATION_RESP: {
|
||||
mme_app_handle_nas_auth_resp(&received_message_p->ittiMsg.nas_auth_resp);
|
||||
} break;
|
||||
#else
|
||||
case NAS_AUTHENTICATION_PARAM_REQ: {
|
||||
mme_app_handle_nas_auth_param_req(&received_message_p->ittiMsg.nas_auth_param_req);
|
||||
} break;
|
||||
#endif
|
||||
|
||||
case TIMER_HAS_EXPIRED: {
|
||||
/* Check if it is the statistic timer */
|
||||
if (received_message_p->ittiMsg.timer_has_expired.timer_id ==
|
||||
|
||||
@@ -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 **
|
||||
** **
|
||||
** Inputs: None **
|
||||
** Others: None **
|
||||
** Inputs: None **
|
||||
** Others: None **
|
||||
** **
|
||||
** Outputs: None **
|
||||
** Return: None **
|
||||
** Others: None **
|
||||
** Return: None **
|
||||
** Others: None **
|
||||
** **
|
||||
***************************************************************************/
|
||||
void esm_main_cleanup(void)
|
||||
{
|
||||
LOG_FUNC_IN;
|
||||
|
||||
int i;
|
||||
int pid;
|
||||
int bid;
|
||||
#ifdef NAS_UE
|
||||
{
|
||||
int i;
|
||||
int pid;
|
||||
int bid;
|
||||
|
||||
#ifdef NAS_UE
|
||||
/* De-activate EPS bearers and clean up PDN connections */
|
||||
for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) {
|
||||
if (_esm_data.pdn[pid].data) {
|
||||
esm_pdn_t *pdn = _esm_data.pdn[pid].data;
|
||||
if (pdn->apn.length > 0) {
|
||||
free(pdn->apn.value);
|
||||
}
|
||||
/* Release EPS bearer contexts */
|
||||
for (bid = 0; bid < pdn->n_bearers; bid++) {
|
||||
if (pdn->bearer[bid]) {
|
||||
LOG_TRACE(WARNING, "ESM-MAIN - Release EPS bearer "
|
||||
"context (ebi=%d)", pdn->bearer[bid]->ebi);
|
||||
/* Delete the TFT */
|
||||
for (i = 0; i < pdn->bearer[bid]->tft.n_pkfs; i++) {
|
||||
if (pdn->bearer[bid]->tft.pkf[i]) {
|
||||
free(pdn->bearer[bid]->tft.pkf[i]);
|
||||
}
|
||||
}
|
||||
free(pdn->bearer[bid]);
|
||||
/* De-activate EPS bearers and clean up PDN connections */
|
||||
for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) {
|
||||
if (_esm_data.pdn[pid].data) {
|
||||
esm_pdn_t *pdn = _esm_data.pdn[pid].data;
|
||||
if (pdn->apn.length > 0) {
|
||||
free(pdn->apn.value);
|
||||
}
|
||||
/* Release EPS bearer contexts */
|
||||
for (bid = 0; bid < pdn->n_bearers; bid++) {
|
||||
if (pdn->bearer[bid]) {
|
||||
LOG_TRACE(WARNING, "ESM-MAIN - Release EPS bearer "
|
||||
"context (ebi=%d)", pdn->bearer[bid]->ebi);
|
||||
/* Delete the TFT */
|
||||
for (i = 0; i < pdn->bearer[bid]->tft.n_pkfs; i++) {
|
||||
if (pdn->bearer[bid]->tft.pkf[i]) {
|
||||
free(pdn->bearer[bid]->tft.pkf[i]);
|
||||
}
|
||||
}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user