This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/23859 ) Change subject: gbproxy_main: Process options after all initialization is done ...................................................................... gbproxy_main: Process options after all initialization is done Previously gprs_ns2_vty_init() was called after handle_options(). This caused config-ns* commands to be missing when calling osmo-gbproxy --vty-ref-xml which is used to generate the vty reference manual. This commit moves argument handling until after all VTY commands have been installed. Change-Id: I0f779c16085a42b308925a676b144999106f2b63 --- M src/gb_proxy_main.c 1 file changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gbproxy refs/changes/59/23859/1 diff --git a/src/gb_proxy_main.c b/src/gb_proxy_main.c index cf7421f..1a4e951 100644 --- a/src/gb_proxy_main.c +++ b/src/gb_proxy_main.c @@ -289,23 +289,6 @@ osmo_cpu_sched_vty_init(tall_sgsn_ctx); gbproxy_vty_init(); - handle_options(argc, argv); - - /* Backwards compatibility: for years, the default config file name was - * osmo_gbproxy.cfg. All other Osmocom programs use osmo-*.cfg with a - * dash. To be able to use the new config file name without breaking - * previous setups that might rely on the legacy default config file - * name, we need to look for the old config file if no -c option was - * passed AND no file exists with the new default file name. */ - if (!config_file) { - /* No -c option was passed */ - if (file_exists(CONFIG_FILE_LEGACY) - && !file_exists(CONFIG_FILE_DEFAULT)) - config_file = CONFIG_FILE_LEGACY; - else - config_file = CONFIG_FILE_DEFAULT; - } - rate_ctr_init(tall_sgsn_ctx); osmo_stats_init(tall_sgsn_ctx); @@ -323,6 +306,23 @@ gprs_ns2_vty_init(gbcfg->nsi); logging_vty_add_deprecated_subsys(tall_sgsn_ctx, "bssgp"); + handle_options(argc, argv); + + /* Backwards compatibility: for years, the default config file name was + * osmo_gbproxy.cfg. All other Osmocom programs use osmo-*.cfg with a + * dash. To be able to use the new config file name without breaking + * previous setups that might rely on the legacy default config file + * name, we need to look for the old config file if no -c option was + * passed AND no file exists with the new default file name. */ + if (!config_file) { + /* No -c option was passed */ + if (file_exists(CONFIG_FILE_LEGACY) + && !file_exists(CONFIG_FILE_DEFAULT)) + config_file = CONFIG_FILE_LEGACY; + else + config_file = CONFIG_FILE_DEFAULT; + } + bssgp_set_bssgp_callback(gbprox_bssgp_send_cb, gbcfg); rc = gbproxy_parse_config(config_file, gbcfg); -- To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/23859 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gbproxy Gerrit-Branch: master Gerrit-Change-Id: I0f779c16085a42b308925a676b144999106f2b63 Gerrit-Change-Number: 23859 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210422/5efce6d5/attachment.htm>