Commit e62448d3 authored by winckel's avatar winckel

Added a HSS connection test in MME before accepting eNB association request.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4919 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 326f508e
......@@ -218,7 +218,12 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
s1ap_eNB_mme_data_t *mme_desc_p;
S1ap_S1SetupFailureIEs_t *s1_setup_failure_p;
s1ap_eNB_mme_data_t *mme_desc_p;
DevAssert(message_p != NULL);
s1_setup_failure_p = &message_p->msg.s1ap_S1SetupFailureIEs;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */
if (stream != 0) {
......@@ -232,7 +237,12 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
return -1;
}
S1AP_ERROR("Received s1 setup failure for MME... please check your parameters\n");
if ((s1_setup_failure_p->cause.present == S1ap_Cause_PR_misc) &&
(s1_setup_failure_p->cause.choice.misc == S1ap_CauseMisc_unspecified)) {
S1AP_WARN("Received s1 setup failure for MME... MME is not ready\n");
} else {
S1AP_ERROR("Received s1 setup failure for MME... please check your parameters\n");
}
mme_desc_p->state = S1AP_ENB_STATE_WAITING;
s1ap_handle_s1_setup_message(mme_desc_p, 0);
......
......@@ -62,9 +62,12 @@
#if !defined(MME_CLIENT_TEST)
// static pthread_t s1ap_task_thread;
uint32_t nb_eNB_associated = 0;
STAILQ_HEAD(eNB_list_s, eNB_description_s) eNB_list_head;
static int indent = 0;
int hss_associated = 0;
uint32_t nb_eNB_associated = 0;
STAILQ_HEAD(eNB_list_s, eNB_description_s)
eNB_list_head;
static int indent = 0;
void *s1ap_mme_thread(void *args);
......@@ -103,6 +106,10 @@ void *s1ap_mme_thread(void *args)
switch (ITTI_MSG_ID(received_message_p))
{
case ACTIVATE_MESSAGE: {
hss_associated = 1;
} break;
case SCTP_DATA_IND: {
/* New message received from SCTP layer.
* Decode and handle it.
......
......@@ -111,8 +111,9 @@ typedef struct eNB_description_s {
/*@}*/
} eNB_description_t;
extern uint32_t nb_eNB_associated;
extern mme_config_t *global_mme_config_p;
extern int hss_associated;
extern uint32_t nb_eNB_associated;
extern mme_config_t *global_mme_config_p;
/** \brief S1AP layer top init
* @returns -1 in case of failure
......
This diff is collapsed.
......@@ -50,8 +50,15 @@ void s6a_peer_connected_cb(struct peer_info *info, void *arg)
if (info == NULL) {
S6A_ERROR("Failed to connect to HSS entity\n");
} else {
MessageDef *message_p;
S6A_DEBUG("Peer %*s is now connected...\n",
(int)info->pi_diamidlen, info->pi_diamid);
/* Inform S1AP that connection to HSS is established */
message_p = itti_alloc_new_message(TASK_S6A, ACTIVATE_MESSAGE);
itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p);
}
/* For test */
......
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