Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
502e4509
Commit
502e4509
authored
Oct 01, 2017
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'RU-RAU-split' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into RU-RAU-split
parents
7fb01d4e
072d9d43
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
17 deletions
+26
-17
common/config/config_cmdline.c
common/config/config_cmdline.c
+10
-8
common/config/config_load_configmodule.c
common/config/config_load_configmodule.c
+5
-5
common/config/config_userapi.c
common/config/config_userapi.c
+5
-0
openair2/UTIL/LOG/log.c
openair2/UTIL/LOG/log.c
+5
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-3
No files found.
common/config/config_cmdline.c
View file @
502e4509
...
@@ -41,12 +41,14 @@ char *tmpval = value;
...
@@ -41,12 +41,14 @@ char *tmpval = value;
int
optisset
=
0
;
int
optisset
=
0
;
char
defbool
[
2
]
=
"1"
;
char
defbool
[
2
]
=
"1"
;
if
(
((
cfgoptions
->
paramflags
&
PARAMFLAG_BOOL
)
==
0
)
&&
value
==
NULL
)
{
/* not a boolean, argument required */
if
(
value
==
NULL
)
{
if
(
(
cfgoptions
->
paramflags
&
PARAMFLAG_BOOL
)
==
0
)
{
/* not a boolean, argument required */
fprintf
(
stderr
,
"[CONFIG] command line, option %s requires an argument
\n
"
,
cfgoptions
->
optname
);
fprintf
(
stderr
,
"[CONFIG] command line, option %s requires an argument
\n
"
,
cfgoptions
->
optname
);
return
0
;
return
0
;
}
else
{
/* boolean value option without argument, set value to true*/
}
else
{
/* boolean value option without argument, set value to true*/
tmpval
=
defbool
;
tmpval
=
defbool
;
}
}
}
switch
(
cfgoptions
->
type
)
switch
(
cfgoptions
->
type
)
{
{
case
TYPE_STRING
:
case
TYPE_STRING
:
...
@@ -124,8 +126,8 @@ char *cfgpath;
...
@@ -124,8 +126,8 @@ char *cfgpath;
if
(
strcmp
(
*
p
,
"-h"
)
==
0
||
strcmp
(
*
p
,
"--help"
)
==
0
)
{
if
(
strcmp
(
*
p
,
"-h"
)
==
0
||
strcmp
(
*
p
,
"--help"
)
==
0
)
{
config_printhelp
(
cfgoptions
,
numoptions
);
config_printhelp
(
cfgoptions
,
numoptions
);
}
}
if
(
*
p
[
0
]
==
'-'
)
{
if
(
*
p
[
0
]
==
'-'
)
{
for
(
int
i
=
0
;
i
<
numoptions
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numoptions
;
i
++
)
{
if
(
(
cfgoptions
[
i
].
paramflags
&
PARAMFLAG_DISABLECMDLINE
)
!=
0
)
{
if
(
(
cfgoptions
[
i
].
paramflags
&
PARAMFLAG_DISABLECMDLINE
)
!=
0
)
{
continue
;
continue
;
...
@@ -135,17 +137,17 @@ char *cfgpath;
...
@@ -135,17 +137,17 @@ char *cfgpath;
}
else
{
}
else
{
sprintf
(
cfgpath
,
"%s"
,
cfgoptions
[
i
].
optname
);
sprintf
(
cfgpath
,
"%s"
,
cfgoptions
[
i
].
optname
);
}
}
if
(
((
strlen
(
*
p
)
==
2
)
&&
(
strcmp
(
*
p
+
1
,
cfgpath
)
==
0
))
||
if
(
((
strlen
(
*
p
)
==
2
)
&&
(
strcmp
(
*
p
+
1
,
cfgpath
)
==
0
))
||
((
strlen
(
*
p
)
>
2
)
&&
(
strcmp
(
*
p
+
2
,
cfgpath
)
==
0
))
)
{
((
strlen
(
*
p
)
>
2
)
&&
(
strcmp
(
*
p
+
2
,
cfgpath
)
==
0
))
)
{
pp
=
*
(
p
+
1
);
pp
=
*
(
p
+
1
);
if
(
(
pp
!=
NULL
)
&&
(
pp
[
0
]
!=
'-'
)
)
{
if
(
(
pp
!=
NULL
)
&&
(
c
>
1
)
&&
(
pp
[
0
]
!=
'-'
)
)
{
p
++
;
c
--
;
j
+=
processoption
(
&
(
cfgoptions
[
i
]),
pp
);
j
+=
processoption
(
&
(
cfgoptions
[
i
]),
pp
);
}
else
{
}
else
{
j
+=
processoption
(
&
(
cfgoptions
[
i
]),
NULL
);
j
+=
processoption
(
&
(
cfgoptions
[
i
]),
NULL
);
}
}
break
;
}
}
}
/* for */
}
/* for */
}
/* if (*p[0] == '-') */
}
/* if (*p[0] == '-') */
...
...
common/config/config_load_configmodule.c
View file @
502e4509
...
@@ -109,14 +109,14 @@ char *atoken;
...
@@ -109,14 +109,14 @@ char *atoken;
uint32_t
tmpflags
=
0
;
uint32_t
tmpflags
=
0
;
int
i
;
int
i
;
/* first parse the command line to look for the -O option */
/* first parse the command line to look for the -O option */
opterr
=
0
;
opterr
=
0
;
while
((
i
=
getopt
(
argc
,
argv
,
"O:h"
))
!=
-
1
)
{
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
if
(
i
==
'O'
)
{
if
(
strlen
(
argv
[
i
])
<
2
)
continue
;
cfgparam
=
optarg
;
if
(
argv
[
i
][
1
]
==
'O'
&&
i
<
(
argc
-
1
))
{
cfgparam
=
argv
[
i
+
1
];
}
}
if
(
i
==
'h'
)
{
if
(
argv
[
i
][
1
]
==
'h'
)
{
tmpflags
=
CONFIG_HELP
;
tmpflags
=
CONFIG_HELP
;
}
}
}
}
...
...
common/config/config_userapi.c
View file @
502e4509
...
@@ -123,6 +123,11 @@ void config_printhelp(paramdef_t *params,int numparams)
...
@@ -123,6 +123,11 @@ void config_printhelp(paramdef_t *params,int numparams)
int
config_get
(
paramdef_t
*
params
,
int
numparams
,
char
*
prefix
)
int
config_get
(
paramdef_t
*
params
,
int
numparams
,
char
*
prefix
)
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
if
(
CONFIG_ISFLAGSET
(
CONFIG_ABORT
))
{
fprintf
(
stderr
,
"[CONFIG] config_get skipped, config module not properly initialized
\n
"
);
return
ret
;
}
configmodule_interface_t
*
cfgif
=
config_get_if
();
configmodule_interface_t
*
cfgif
=
config_get_if
();
if
(
cfgif
!=
NULL
)
{
if
(
cfgif
!=
NULL
)
{
ret
=
config_get_if
()
->
get
(
params
,
numparams
,
prefix
);
ret
=
config_get_if
()
->
get
(
params
,
numparams
,
prefix
);
...
...
openair2/UTIL/LOG/log.c
View file @
502e4509
...
@@ -113,7 +113,11 @@ void log_getconfig(log_t *g_log) {
...
@@ -113,7 +113,11 @@ void log_getconfig(log_t *g_log) {
paramdef_t
logparams_verbosity
[
MAX_LOG_COMPONENTS
];
paramdef_t
logparams_verbosity
[
MAX_LOG_COMPONENTS
];
paramdef_t
logparams_logfile
[
MAX_LOG_COMPONENTS
];
paramdef_t
logparams_logfile
[
MAX_LOG_COMPONENTS
];
config_get
(
logparams_defaults
,
sizeof
(
logparams_defaults
)
/
sizeof
(
paramdef_t
),
CONFIG_STRING_LOG_PREFIX
);
int
ret
=
config_get
(
logparams_defaults
,
sizeof
(
logparams_defaults
)
/
sizeof
(
paramdef_t
),
CONFIG_STRING_LOG_PREFIX
);
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"[LOG] init aborted, configuration couldn't be performed"
);
return
;
}
memset
(
logparams_level
,
0
,
sizeof
(
paramdef_t
)
*
MAX_LOG_COMPONENTS
);
memset
(
logparams_level
,
0
,
sizeof
(
paramdef_t
)
*
MAX_LOG_COMPONENTS
);
memset
(
logparams_verbosity
,
0
,
sizeof
(
paramdef_t
)
*
MAX_LOG_COMPONENTS
);
memset
(
logparams_verbosity
,
0
,
sizeof
(
paramdef_t
)
*
MAX_LOG_COMPONENTS
);
memset
(
logparams_logfile
,
0
,
sizeof
(
paramdef_t
)
*
MAX_LOG_COMPONENTS
);
memset
(
logparams_logfile
,
0
,
sizeof
(
paramdef_t
)
*
MAX_LOG_COMPONENTS
);
...
...
targets/RT/USER/lte-softmodem.c
View file @
502e4509
...
@@ -584,7 +584,7 @@ static void get_options(void) {
...
@@ -584,7 +584,7 @@ static void get_options(void) {
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_GLOGLEVEL_IDX
))
{
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_GLOGLEVEL_IDX
))
{
set_glog
(
glog_level
,
-
1
);
set_glog
(
glog_level
,
-
1
);
}
}
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_GLOG
LEVEL
_IDX
))
{
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_GLOG
VERBO
_IDX
))
{
set_glog
(
-
1
,
glog_verbosity
);
set_glog
(
-
1
,
glog_verbosity
);
}
}
if
(
start_telnetsrv
)
{
if
(
start_telnetsrv
)
{
...
@@ -890,7 +890,6 @@ int main( int argc, char **argv )
...
@@ -890,7 +890,6 @@ int main( int argc, char **argv )
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
}
#ifdef DEBUG_CONSOLE
#ifdef DEBUG_CONSOLE
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
setvbuf
(
stderr
,
NULL
,
_IONBF
,
0
);
setvbuf
(
stderr
,
NULL
,
_IONBF
,
0
);
...
@@ -920,7 +919,6 @@ int main( int argc, char **argv )
...
@@ -920,7 +919,6 @@ int main( int argc, char **argv )
}
}
#if T_TRACER
#if T_TRACER
T_init
(
T_port
,
T_wait
,
T_dont_fork
);
T_init
(
T_port
,
T_wait
,
T_dont_fork
);
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment