Changed eNB_id option handling to have default value if not given in configuration file.
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5000 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -113,11 +113,6 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)
|
||||
# endif
|
||||
{
|
||||
s1ap_register_enb_req_t *s1ap_register_eNB;
|
||||
uint32_t hash;
|
||||
|
||||
/* Overwrite default eNB ID */
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_properties[enb_id]->eNB_id = enb_id + (hash & 0xFFFF8);
|
||||
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
|
||||
@@ -126,9 +126,16 @@ int enb_config_init(char* lib_config_file_name_pP, Enb_properties_t **enb_proper
|
||||
num_enbs = config_setting_length(setting);
|
||||
for (i = 0; i < num_enbs; i++) {
|
||||
setting_enb = config_setting_get_elem(setting, i);
|
||||
if( !(
|
||||
config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)
|
||||
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type)
|
||||
|
||||
if(! config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)) {
|
||||
uint32_t hash;
|
||||
|
||||
/* Calculate a default eNB ID */
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = i + (hash & 0xFFFF8);
|
||||
}
|
||||
|
||||
if( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type)
|
||||
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name)
|
||||
&& config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac)
|
||||
&& config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc)
|
||||
|
||||
Reference in New Issue
Block a user