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
promise
OpenXG-RAN
Commits
53907d37
Commit
53907d37
authored
Sep 26, 2017
by
oai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix command line processing crash
parent
aae10bf0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
21 deletions
+29
-21
common/config/config_cmdline.c
common/config/config_cmdline.c
+19
-14
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+7
-5
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+1
-1
No files found.
common/config/config_cmdline.c
View file @
53907d37
...
...
@@ -39,9 +39,8 @@ int processoption(paramdef_t *cfgoptions, char *value)
{
int
argok
=
1
;
char
*
tmpval
=
value
;
int
ret
=
0
;
int
optisset
;
char
defbool
[
2
]
=
"1"
;
if
(
value
==
NULL
)
{
argok
=
0
;
}
else
if
(
value
[
0
]
==
'-'
)
{
...
...
@@ -51,11 +50,11 @@ int optisset;
if
(
argok
==
0
)
{
fprintf
(
stderr
,
"[CONFIG] command line, option %s requires an argument
\n
"
,
cfgoptions
->
optname
);
return
0
;
}
else
{
/* boolean value */
tmpval
=
"1"
;
}
}
}
}
else
{
/* boolean value */
tmpval
=
defbool
;
}
printf
(
"cc 0x%08x, %i
\n
"
,
tmpval
,
argok
);
switch
(
cfgoptions
->
type
)
{
case
TYPE_STRING
:
...
...
@@ -128,7 +127,7 @@ char *cfgpath;
j
=
0
;
p
++
;
c
--
;
while
(
c
>
=
0
&&
*
p
!=
NULL
)
{
while
(
c
>
0
&&
*
p
!=
NULL
)
{
if
(
strcmp
(
*
p
,
"-h"
)
==
0
||
strcmp
(
*
p
,
"--help"
)
==
0
)
{
config_printhelp
(
cfgoptions
,
numoptions
);
}
...
...
@@ -143,13 +142,19 @@ char *cfgpath;
}
if
(
((
strlen
(
*
p
)
==
2
)
&&
(
strcmp
(
*
p
+
1
,
cfgpath
)
==
0
))
||
((
strlen
(
*
p
)
>
2
)
&&
(
strcmp
(
*
p
+
2
,
cfgpath
)
==
0
))
)
{
p
++
;
c
--
;
j
=
processoption
(
&
(
cfgoptions
[
i
]),
*
p
);
if
(
j
==
0
)
{
c
++
;
p
--
;
if
(
c
>
1
)
{
p
++
;
c
--
;
j
=
processoption
(
&
(
cfgoptions
[
i
]),
*
p
);
if
(
j
==
0
)
{
c
++
;
p
--
;
}
}
else
{
j
=
processoption
(
&
(
cfgoptions
[
i
]),
NULL
);
}
}
}
p
++
;
...
...
openair1/PHY/defs.h
View file @
53907d37
...
...
@@ -613,7 +613,8 @@ typedef enum {
REMOTE_IF5
=
1
,
REMOTE_MBP_IF5
=
2
,
REMOTE_IF4p5
=
3
,
MAX_RU_IF_TYPES
=
4
REMOTE_IF1pp
=
4
,
MAX_RU_IF_TYPES
=
5
}
RU_if_south_t
;
typedef
struct
RU_t_s
{
...
...
targets/RT/USER/lte-softmodem.c
View file @
53907d37
...
...
@@ -625,17 +625,12 @@ void *l2l1_task(void *arg) {
static
void
get_options
(
void
)
{
int
CC_id
;
int
clock_src
;
int
tddflag
;
char
*
loopfile
=
NULL
;
int
dumpframe
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC
;
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
tddflag
>
0
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
frame_parms
[
CC_id
]
->
frame_type
=
TDD
;
}
if
(
strlen
(
in_path
)
>
0
)
{
opt_type
=
OPT_PCAP
;
...
...
@@ -650,6 +645,9 @@ static void get_options(void) {
if
(
UE_flag
>
0
)
{
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_UEPARAMS_DESC
;
config_process_cmdline
(
cmdline_uemodeparams
,
sizeof
(
cmdline_uemodeparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_ueparams
,
sizeof
(
cmdline_ueparams
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
loopfile
!=
NULL
)
{
...
...
@@ -676,6 +674,10 @@ static void get_options(void) {
UE_scan
=
0
;
}
if
(
tddflag
>
0
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
frame_parms
[
CC_id
]
->
frame_type
=
TDD
;
}
if
(
frame_parms
[
0
]
->
N_RB_DL
!=
0
)
{
if
(
frame_parms
[
0
]
->
N_RB_DL
<
6
)
{
...
...
targets/RT/USER/lte-softmodem.h
View file @
53907d37
...
...
@@ -155,7 +155,7 @@ extern int16_t dlsch_demod_shift;
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS,
0, i8ptr:&do_forms,
defintval:0, TYPE_INT8, 0}, \
{"d" , CONFIG_HLP_SOFTS,
PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms,
defintval:0, TYPE_INT8, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
{"U" , CONFIG_HLP_UE, PARAMFLAG_BOOL, i8ptr:&UE_flag, defintval:0, TYPE_INT8, 0}, \
...
...
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