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
wangjie
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
Show 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)
...
@@ -39,9 +39,8 @@ int processoption(paramdef_t *cfgoptions, char *value)
{
{
int
argok
=
1
;
int
argok
=
1
;
char
*
tmpval
=
value
;
char
*
tmpval
=
value
;
int
ret
=
0
;
int
optisset
;
int
optisset
;
char
defbool
[
2
]
=
"1"
;
if
(
value
==
NULL
)
{
if
(
value
==
NULL
)
{
argok
=
0
;
argok
=
0
;
}
else
if
(
value
[
0
]
==
'-'
)
{
}
else
if
(
value
[
0
]
==
'-'
)
{
...
@@ -51,11 +50,11 @@ int optisset;
...
@@ -51,11 +50,11 @@ int optisset;
if
(
argok
==
0
)
{
if
(
argok
==
0
)
{
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 */
tmpval
=
"1"
;
}
}
}
else
{
/* boolean value */
tmpval
=
defbool
;
}
}
printf
(
"cc 0x%08x, %i
\n
"
,
tmpval
,
argok
);
switch
(
cfgoptions
->
type
)
switch
(
cfgoptions
->
type
)
{
{
case
TYPE_STRING
:
case
TYPE_STRING
:
...
@@ -128,7 +127,7 @@ char *cfgpath;
...
@@ -128,7 +127,7 @@ char *cfgpath;
j
=
0
;
j
=
0
;
p
++
;
p
++
;
c
--
;
c
--
;
while
(
c
>
=
0
&&
*
p
!=
NULL
)
{
while
(
c
>
0
&&
*
p
!=
NULL
)
{
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
);
}
}
...
@@ -143,6 +142,8 @@ char *cfgpath;
...
@@ -143,6 +142,8 @@ char *cfgpath;
}
}
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
))
)
{
if
(
c
>
1
)
{
p
++
;
p
++
;
c
--
;
c
--
;
j
=
processoption
(
&
(
cfgoptions
[
i
]),
*
p
);
j
=
processoption
(
&
(
cfgoptions
[
i
]),
*
p
);
...
@@ -150,6 +151,10 @@ char *cfgpath;
...
@@ -150,6 +151,10 @@ char *cfgpath;
c
++
;
c
++
;
p
--
;
p
--
;
}
}
}
else
{
j
=
processoption
(
&
(
cfgoptions
[
i
]),
NULL
);
}
}
}
}
}
p
++
;
p
++
;
...
...
openair1/PHY/defs.h
View file @
53907d37
...
@@ -613,7 +613,8 @@ typedef enum {
...
@@ -613,7 +613,8 @@ typedef enum {
REMOTE_IF5
=
1
,
REMOTE_IF5
=
1
,
REMOTE_MBP_IF5
=
2
,
REMOTE_MBP_IF5
=
2
,
REMOTE_IF4p5
=
3
,
REMOTE_IF4p5
=
3
,
MAX_RU_IF_TYPES
=
4
REMOTE_IF1pp
=
4
,
MAX_RU_IF_TYPES
=
5
}
RU_if_south_t
;
}
RU_if_south_t
;
typedef
struct
RU_t_s
{
typedef
struct
RU_t_s
{
...
...
targets/RT/USER/lte-softmodem.c
View file @
53907d37
...
@@ -625,17 +625,12 @@ void *l2l1_task(void *arg) {
...
@@ -625,17 +625,12 @@ void *l2l1_task(void *arg) {
static
void
get_options
(
void
)
{
static
void
get_options
(
void
)
{
int
CC_id
;
int
CC_id
;
int
clock_src
;
int
tddflag
;
int
tddflag
;
char
*
loopfile
=
NULL
;
char
*
loopfile
=
NULL
;
int
dumpframe
;
int
dumpframe
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC
;
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
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
)
{
if
(
strlen
(
in_path
)
>
0
)
{
opt_type
=
OPT_PCAP
;
opt_type
=
OPT_PCAP
;
...
@@ -650,6 +645,9 @@ static void get_options(void) {
...
@@ -650,6 +645,9 @@ static void get_options(void) {
if
(
UE_flag
>
0
)
{
if
(
UE_flag
>
0
)
{
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_UEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_UEPARAMS_DESC
;
config_process_cmdline
(
cmdline_uemodeparams
,
sizeof
(
cmdline_uemodeparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_uemodeparams
,
sizeof
(
cmdline_uemodeparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_ueparams
,
sizeof
(
cmdline_ueparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_ueparams
,
sizeof
(
cmdline_ueparams
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
loopfile
!=
NULL
)
{
if
(
loopfile
!=
NULL
)
{
...
@@ -676,6 +674,10 @@ static void get_options(void) {
...
@@ -676,6 +674,10 @@ static void get_options(void) {
UE_scan
=
0
;
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
!=
0
)
{
if
(
frame_parms
[
0
]
->
N_RB_DL
<
6
)
{
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;
...
@@ -155,7 +155,7 @@ extern int16_t dlsch_demod_shift;
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"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}, \
{"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}, \
{"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}, \
{"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}, \
{"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}, \
{"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