Commit b65c515c authored by winckel's avatar winckel

Updated Asserts.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5010 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent cc5be1ef
...@@ -454,9 +454,7 @@ static void init_MBMS (u8 Mod_id, u32 frame) { ...@@ -454,9 +454,7 @@ static void init_MBMS (u8 Mod_id, u32 frame) {
&(eNB_rrc_inst[Mod_id].mcch_message->pmch_InfoList_r9)); &(eNB_rrc_inst[Mod_id].mcch_message->pmch_InfoList_r9));
//rrc_mac_config_req(); //rrc_mac_config_req();
} }
} }
#endif #endif
...@@ -495,7 +493,7 @@ static uint8_t rrc_eNB_get_next_free_UE_index (uint8_t Mod_id, uint64_t UE_ident ...@@ -495,7 +493,7 @@ static uint8_t rrc_eNB_get_next_free_UE_index (uint8_t Mod_id, uint64_t UE_ident
{ {
uint8_t i, first_index = UE_INDEX_INVALID, reg = 0; uint8_t i, first_index = UE_INDEX_INVALID, reg = 0;
DevCheck(Mod_id < NB_eNB_INST, Mod_id, NB_eNB_INST, 0); AssertFatal(Mod_id < NB_eNB_INST, "eNB index invalid (%d/%d)!", Mod_id, NB_eNB_INST);
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if ((first_index == UE_INDEX_INVALID) && (eNB_rrc_inst[Mod_id].Info.UE_list[i] == 0)) { if ((first_index == UE_INDEX_INVALID) && (eNB_rrc_inst[Mod_id].Info.UE_list[i] == 0)) {
...@@ -519,8 +517,8 @@ static uint8_t rrc_eNB_get_next_free_UE_index (uint8_t Mod_id, uint64_t UE_ident ...@@ -519,8 +517,8 @@ static uint8_t rrc_eNB_get_next_free_UE_index (uint8_t Mod_id, uint64_t UE_ident
void rrc_eNB_free_UE_index (uint8_t Mod_id, uint8_t UE_id) void rrc_eNB_free_UE_index (uint8_t Mod_id, uint8_t UE_id)
{ {
DevCheck(Mod_id < NB_eNB_INST, Mod_id, UE_id, NB_eNB_INST); AssertFatal(Mod_id < NB_eNB_INST, "eNB index invalid (%d/%d) for UE %d!", Mod_id, NB_eNB_INST, UE_id);
DevCheck(UE_id < NUMBER_OF_UE_MAX, Mod_id, UE_id, NUMBER_OF_UE_MAX); AssertFatal(UE_id < NUMBER_OF_UE_MAX, "UE index invalid (%d/%d) for eNB %d!", UE_id, NUMBER_OF_UE_MAX, Mod_id);
LOG_I (RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", Mod_id, UE_id, eNB_rrc_inst[Mod_id].Info.UE_list[UE_id]); LOG_I (RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", Mod_id, UE_id, eNB_rrc_inst[Mod_id].Info.UE_list[UE_id]);
eNB_rrc_inst[Mod_id].Info.UE[UE_id].Status = RRC_IDLE; eNB_rrc_inst[Mod_id].Info.UE[UE_id].Status = RRC_IDLE;
...@@ -2398,7 +2396,7 @@ void rrc_eNB_generate_RRCConnectionSetup (u8 Mod_id, u32 frame, u16 UE_index) { ...@@ -2398,7 +2396,7 @@ void rrc_eNB_generate_RRCConnectionSetup (u8 Mod_id, u32 frame, u16 UE_index) {
SRB_ToAddMod_t *SRB1_config; SRB_ToAddMod_t *SRB1_config;
int cnt; int cnt;
DevCheck(UE_index < NUMBER_OF_UE_MAX, UE_index, NUMBER_OF_UE_MAX, 0); AssertFatal(UE_index < NUMBER_OF_UE_MAX, "UE index invalid (%d/%d) for eNB %d!", UE_index, NUMBER_OF_UE_MAX, Mod_id);
SRB_configList = &eNB_rrc_inst[Mod_id].SRB_configList[UE_index]; SRB_configList = &eNB_rrc_inst[Mod_id].SRB_configList[UE_index];
...@@ -2496,7 +2494,7 @@ char openair_rrc_lite_eNB_init (u8 Mod_id) ...@@ -2496,7 +2494,7 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
LOG_D (RRC, "[MSC_NEW][FRAME 00000][RRC_eNB][MOD %02d][]\n", Mod_id); LOG_D (RRC, "[MSC_NEW][FRAME 00000][RRC_eNB][MOD %02d][]\n", Mod_id);
LOG_D (RRC, "[MSC_NEW][FRAME 00000][IP][MOD %02d][]\n", Mod_id); LOG_D (RRC, "[MSC_NEW][FRAME 00000][IP][MOD %02d][]\n", Mod_id);
DevAssert(eNB_rrc_inst != NULL); AssertFatal(eNB_rrc_inst != NULL, "eNB_rrc_inst not initialized!");
for (j = 0; j < NUMBER_OF_UE_MAX; j++) for (j = 0; j < NUMBER_OF_UE_MAX; j++)
eNB_rrc_inst[Mod_id].Info.UE[j].Status = RRC_IDLE; //CH_READY; eNB_rrc_inst[Mod_id].Info.UE[j].Status = RRC_IDLE; //CH_READY;
......
...@@ -97,7 +97,7 @@ static uint16_t get_next_ue_initial_id(uint8_t mod_id) { ...@@ -97,7 +97,7 @@ static uint16_t get_next_ue_initial_id(uint8_t mod_id) {
static uint8_t get_UE_index_from_initial_id(uint8_t mod_id, uint16_t ue_initial_id) { static uint8_t get_UE_index_from_initial_id(uint8_t mod_id, uint16_t ue_initial_id) {
uint8_t ue_index; uint8_t ue_index;
DevCheck(mod_id < NB_eNB_INST, mod_id, NB_eNB_INST, 0); AssertFatal(mod_id < NB_eNB_INST, "eNB index invalid (%d/%d)!", mod_id, NB_eNB_INST);
LOG_D(RRC, "[eNB %d] get_UE_index_from_initial_id: ue_initial_id %d\n", ue_initial_id); LOG_D(RRC, "[eNB %d] get_UE_index_from_initial_id: ue_initial_id %d\n", ue_initial_id);
for (ue_index = 0; ue_index < NUMBER_OF_UE_MAX; ue_index++) { for (ue_index = 0; ue_index < NUMBER_OF_UE_MAX; ue_index++) {
...@@ -124,7 +124,7 @@ static uint8_t get_UE_index_from_initial_id(uint8_t mod_id, uint16_t ue_initial_ ...@@ -124,7 +124,7 @@ static uint8_t get_UE_index_from_initial_id(uint8_t mod_id, uint16_t ue_initial_
static uint8_t get_UE_index_from_eNB_ue_s1ap_id(uint8_t mod_id, uint32_t eNB_ue_s1ap_id) { static uint8_t get_UE_index_from_eNB_ue_s1ap_id(uint8_t mod_id, uint32_t eNB_ue_s1ap_id) {
uint8_t ue_index; uint8_t ue_index;
DevCheck(mod_id < NB_eNB_INST, mod_id, NB_eNB_INST, 0); AssertFatal(mod_id < NB_eNB_INST, "eNB index invalid (%d/%d)!", mod_id, NB_eNB_INST);
LOG_D(RRC, "[eNB %d] get_UE_index_from_eNB_ue_s1ap_id: eNB_ue_s1ap_id %d\n", mod_id, eNB_ue_s1ap_id); LOG_D(RRC, "[eNB %d] get_UE_index_from_eNB_ue_s1ap_id: eNB_ue_s1ap_id %d\n", mod_id, eNB_ue_s1ap_id);
for (ue_index = 0; ue_index < NUMBER_OF_UE_MAX; ue_index++) { for (ue_index = 0; ue_index < NUMBER_OF_UE_MAX; ue_index++) {
...@@ -390,7 +390,8 @@ void rrc_eNB_send_S1AP_NAS_FIRST_REQ(uint8_t mod_id, uint8_t ue_index, ...@@ -390,7 +390,8 @@ void rrc_eNB_send_S1AP_NAS_FIRST_REQ(uint8_t mod_id, uint8_t ue_index,
S1AP_NAS_FIRST_REQ (message_p).ue_initial_id = eNB_rrc_inst[mod_id].Info.UE[ue_index].ue_initial_id; S1AP_NAS_FIRST_REQ (message_p).ue_initial_id = eNB_rrc_inst[mod_id].Info.UE[ue_index].ue_initial_id;
/* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */ /* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */
DevCheck(eNB_rrc_inst[mod_id].Info.UE[ue_index].establishment_cause < RRC_CAUSE_LAST, AssertFatal(eNB_rrc_inst[mod_id].Info.UE[ue_index].establishment_cause < RRC_CAUSE_LAST,
"Establishment cause invalid (%d/%d) for eNB %d!",
eNB_rrc_inst[mod_id].Info.UE[ue_index].establishment_cause, RRC_CAUSE_LAST, mod_id); eNB_rrc_inst[mod_id].Info.UE[ue_index].establishment_cause, RRC_CAUSE_LAST, mod_id);
S1AP_NAS_FIRST_REQ (message_p).establishment_cause = eNB_rrc_inst[mod_id].Info.UE[ue_index].establishment_cause; S1AP_NAS_FIRST_REQ (message_p).establishment_cause = eNB_rrc_inst[mod_id].Info.UE[ue_index].establishment_cause;
......
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