Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/31775 )
Change subject: {utils,tests}/Makefile.am: reorder libraries in LDADD
......................................................................
Patch Set 2:
(1 comment)
File tests/Makefile.am:
https://gerrit.osmocom.org/c/libosmo-netif/+/31775/comment/a990acdc_a6076f1c
PS1, Line 6: $(LIBOSMOCORE_LIBS) \
> these two should be swapped so that GSM is before CORE, to have proper dependency chain.
The ordering of external libraries is not really that important.
What really matters is that the repository-local libraries are listed first.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/31775
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ia639b1c5460ad9391d2c311b4978ca9374789f7a
Gerrit-Change-Number: 31775
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 13 Mar 2023 20:32:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31863 )
Change subject: layer23: fix parsing of command line options
......................................................................
layer23: fix parsing of command line options
After the recent refactoring, parsing of the command line options is
broken for some arguments. Specifically, the value of '-a'/'--arfcn'
is ignored and hard-coded ARFCN=871 is used instead.
The problem is that l23_app_init(), which allocates an MS state and
sets the initial ARFCN, is called *before* handle_options(). So the
cfg_test_arfcn is used before it gets overwritten from the argv[].
The usual approach in osmo-* apps is to parse the command line
arguments first, and only then execute code which depends on
configurable parameters. Let's follow this approach too.
Change-Id: I77ca11c14561fa3fcb9add60ccea5b0b847a20c4
---
M src/host/layer23/src/common/main.c
M src/host/layer23/src/mobile/main.c
2 files changed, 29 insertions(+), 8 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
msuraev: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c
index 31e7154..e4a15ee 100644
--- a/src/host/layer23/src/common/main.c
+++ b/src/host/layer23/src/common/main.c
@@ -254,14 +254,14 @@
print_copyright();
+ handle_options(argc, argv);
+
rc = l23_app_init();
if (rc < 0) {
fprintf(stderr, "Failed during l23_app_init()\n");
exit(1);
}
- handle_options(argc, argv);
-
if (l23_app_info.opt_supported & L23_OPT_VTY) {
if (_vty_init() < 0)
exit(1);
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index 3260bff..d24a802 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -255,6 +255,12 @@
print_copyright();
+ rc = handle_options(argc, argv);
+ if (rc) { /* Abort in case of parsing errors */
+ fprintf(stderr, "Error in command line options. Exiting.\n");
+ return 1;
+ }
+
srand(time(NULL));
INIT_LLIST_HEAD(&ms_list);
@@ -272,12 +278,6 @@
exit(1);
}
- rc = handle_options(argc, argv);
- if (rc) { /* Abort in case of parsing errors */
- fprintf(stderr, "Error in command line options. Exiting.\n");
- return 1;
- }
-
if (custom_cfg_file) {
/* Use full path provided by user */
config_file = talloc_strdup(l23_ctx, custom_cfg_file);
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31863
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I77ca11c14561fa3fcb9add60ccea5b0b847a20c4
Gerrit-Change-Number: 31863
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged