Commit 8dd62b32 authored by frtabu's avatar frtabu

fix bad build_oai directive to compile libconfig for phy-simulators, fix...

fix bad build_oai directive to compile libconfig for phy-simulators, fix load_configmodule crash because config source not set.
parent 18ec5d80
Pipeline #10924 failed with stage
in 0 seconds
......@@ -652,7 +652,7 @@ function main() {
lte-simulators coding \
libcoding.so $dbin/libcoding.so
compilations \
phy_simulators $config_libconfig_shlib \
lte-simulators $config_libconfig_shlib \
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
fi
......
......@@ -201,12 +201,20 @@ int OoptIdx=-1;
cfgparam = getenv("OAI_CONFIGMODULE");
}
/* default */
/* default different for UE and softmodem because UE doesn't use config file*/
/* and -O option is not mandatory for UE */
/* phy simulators behave as UE */
/* test of exec name would better be replaced by a parameter to the l */
/* oad_configmodule function */
if (cfgparam == NULL) {
tmpflags = tmpflags | CONFIG_NOOOPT;
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
if (strstr(argv[0],"uesoftmodem") == NULL || strstr(argv[0],"lsim") == NULL) {
  • we should not make this dependent on the name of the executalbe, in develop-nr there are more executabls that do not fit this if clause.

  • Then i think the solution is to introduce a parameter in the API to tell the config module the caller doesn't use config file or other config source but just the command line.

Please register or sign in to reply
cfgparam = CONFIG_LIBCONFIGFILE ":" DEFAULT_CFGFILENAME;
} else {
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
}
}
/* parse the config parameters to set the config source */
i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams);
if (i< 0) {
......@@ -215,9 +223,9 @@ int OoptIdx=-1;
}
else if ( i == 1 ) {
/* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
with one parameter, the path to the configuration file */
with one parameter, the path to the configuration file cfgmode must not be NULL */
modeparams=cfgmode;
cfgmode=NULL; //strdup(CONFIG_LIBCONFIGFILE);
cfgmode=strdup(CONFIG_LIBCONFIGFILE);
}
cfgptr = calloc(sizeof(configmodule_interface_t),1);
......
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