ENDC: Add X2AP initial configuration and X2AP task in nr-softmodem. Small issue with parsing NRCCPARAMS_DESC from RCconfig_NR_X2() needs to be resolved

This commit is contained in:
matzakos
2019-10-08 18:48:39 +02:00
parent 2e8b93ef8b
commit 7916e17666
9 changed files with 493 additions and 13 deletions
+10 -4
View File
@@ -554,7 +554,6 @@ int is_x2ap_enabled(void)
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
if (pthread_mutex_lock(&mutex)) goto mutex_error;
if (config_loaded) {
if (pthread_mutex_unlock(&mutex)) goto mutex_error;
return enabled;
@@ -567,13 +566,20 @@ int is_x2ap_enabled(void)
/* TODO: do it per module - we check only first eNB */
config_get(p, sizeof(p)/sizeof(paramdef_t), "eNBs.[0]");
if (enable_x2 != NULL && strcmp(enable_x2, "yes") == 0)
enabled = 1;
if (enable_x2 != NULL && strcmp(enable_x2, "yes") == 0){
enabled = 1;
}
/*Consider also the case of enabling X2AP for a gNB by parsing a gNB configuration file*/
config_get(p, sizeof(p)/sizeof(paramdef_t), "gNBs.[0]");
if (enable_x2 != NULL && strcmp(enable_x2, "yes") == 0){
enabled = 1;
}
config_loaded = 1;
if (pthread_mutex_unlock(&mutex)) goto mutex_error;
return enabled;
mutex_error: