Commit e7f0701a authored by Wang Tsu-Han's avatar Wang Tsu-Han

fixes for getting config by command line

parent b25a592c
......@@ -67,6 +67,8 @@ extern PARALLEL_CONF_t get_thread_parallel_conf(void);
extern WORKER_CONF_t get_thread_worker_conf(void);
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw);
extern char *parallel_config;
extern char *worker_config;
void RCconfig_flexran() {
uint16_t i;
......@@ -2495,27 +2497,31 @@ int RCconfig_parallel(void) {
char *parallel_conf = NULL;
char *worker_conf = NULL;
paramdef_t ThreadParams[] = THREAD_CONF_DESC;
paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0};
config_getlist( &THREADParamList,NULL,0,NULL);
if(parallel_config == NULL){
if(THREADParamList.numelt>0) {
config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL);
parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr));
} else {
parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT");
}
set_parallel_conf(parallel_conf);
}
if(worker_config == NULL){
if(THREADParamList.numelt>0) {
config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL);
worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr));
} else {
worker_conf = strdup("WORKER_ENABLE");
}
set_parallel_conf(parallel_conf);
set_worker_conf(worker_conf);
}
return 0;
......
......@@ -35,6 +35,8 @@
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
static softmodem_params_t softmodem_params;
char *parallel_config=NULL;
char *worker_config=NULL;
uint64_t get_softmodem_optmask(void) {
return softmodem_params.optmask;
......@@ -51,8 +53,6 @@ softmodem_params_t* get_softmodem_params(void) {
void get_common_options(void)
{
char *parallel_config=NULL;
char *worker_config=NULL;
uint32_t online_log_messages;
......
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