diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 37f8d711db779d3b50f1d204cd8112431a3da21f..51d6ac6d016c3de2e9f6986645d5d4013b4c6382 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -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 diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c index 7c8c61135b7dc0eb8092c503053f3f8d01dbcb93..cfb6e38440f85268402a3366bbf4d43991a1e7d1 100644 --- a/common/config/config_load_configmodule.c +++ b/common/config/config_load_configmodule.c @@ -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) { + 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);