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
zzha zzha
OpenXG-RAN
Commits
14321bfe
Commit
14321bfe
authored
Apr 01, 2022
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix config file generation to sip command line only options
parent
1fee616d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
common/config/config_paramdesc.h
common/config/config_paramdesc.h
+1
-0
common/config/libconfig/config_libconfig.c
common/config/libconfig/config_libconfig.c
+5
-1
executables/softmodem-common.h
executables/softmodem-common.h
+10
-10
No files found.
common/config/config_paramdesc.h
View file @
14321bfe
...
...
@@ -46,6 +46,7 @@
#define PARAMFLAG_NOFREE (1 << 3) // don't free parameter in end function
#define PARAMFLAG_BOOL (1 << 4) // integer param can be 0 or 1
#define PARAMFLAG_CMDLINE_NOPREFIXENABLED (1 << 5) // on the command line, allow a parameter to be specified without the prefix
#define PARAMFLAG_CMDLINEONLY (1 << 6) // this parameter cannot be specified in config file
/* Flags used by config modules to return info to calling modules and/or to for internal usage*/
#define PARAMFLAG_MALLOCINCONFIG (1 << 15) // parameter allocated in config module
...
...
common/config/libconfig/config_libconfig.c
View file @
14321bfe
...
...
@@ -95,10 +95,14 @@ int config_libconfig_setparams(paramdef_t *cfgoptions, int numoptions, config_se
#define LIBCONFIG_NOTUSED_PARAMS "Not used? (NULL value ptr)"
for
(
int
i
=
0
;
i
<
numoptions
;
i
++
)
{
if
(
cfgoptions
[
i
].
paramflags
&
PARAMFLAG_CMDLINEONLY
)
{
continue
;
printf_params
(
"[LIBCONFIG] setting %s.%s skipped (command line only)
\n
"
,(
prefix
==
NULL
)
?
""
:
prefix
,
cfgoptions
[
i
].
optname
);
}
status
=
CONFIG_FALSE
;
config_setting_t
*
psetting
;
char
*
spath
=
malloc
(((
prefix
==
NULL
)
?
0
:
strlen
(
prefix
))
+
strlen
(
cfgoptions
[
i
].
optname
)
+
10
);
sprintf
(
spath
,
"%s
.%s"
,
prefix
,
cfgoptions
[
i
].
optname
);
sprintf
(
spath
,
"%s
%s%s"
,(
prefix
==
NULL
)
?
""
:
prefix
,
(
prefix
==
NULL
)
?
""
:
"."
,
cfgoptions
[
i
].
optname
);
psetting
=
config_lookup
(
&
(
libconfig_privdata
.
runtcfg
),
spath
);
free
(
spath
);
if
(
psetting
!=
NULL
)
{
...
...
executables/softmodem-common.h
View file @
14321bfe
...
...
@@ -173,17 +173,17 @@ extern int usrp_tx_thread;
#define CONFIG_HLP_WEB "Start embedded web server \n"
#define CONFIG_FLOG_OPT "R"
#define CONFIG_LOGL_OPT "g"
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters for LOG utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
*/
/* command line parameters for LOG utility
*/
/* optname helpstr paramflags
XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
*/
#define CMDLINE_LOGPARAMS_DESC { \
{CONFIG_FLOG_OPT , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
{CONFIG_LOGL_OPT , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
{"websrv", CONFIG_HLP_WEB, PARAMFLAG_BOOL, uptr:&start_websrv, defintval:0, TYPE_UINT, 0}, \
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:NULL, TYPE_STRING, 0}, \
{"telnetclt", NULL, 0, uptr:&start_telnetclt, defstrval:NULL, TYPE_UINT, 0}, \
{CONFIG_FLOG_OPT , CONFIG_HLP_FLOG, 0,
uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
{CONFIG_LOGL_OPT , CONFIG_HLP_LOGL, 0,
uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL
|PARAMFLAG_CMDLINEONLY
, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
{"websrv", CONFIG_HLP_WEB, PARAMFLAG_BOOL
|PARAMFLAG_CMDLINEONLY
, uptr:&start_websrv, defintval:0, TYPE_UINT, 0}, \
{"log-mem", NULL, 0,
strptr:(char **)&logmem_filename, defstrval:NULL, TYPE_STRING, 0}, \
{"telnetclt", NULL, 0,
uptr:&start_telnetclt, defstrval:NULL, TYPE_UINT, 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