Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed May 8 15:24:13 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13921


Change subject: bankd: Don't read CSV file until _after_ handling options
......................................................................

bankd: Don't read CSV file until _after_ handling options

Otherwise "--help" won't work if the CSV cannot be found/read.

Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
---
M src/bankd/bankd_main.c
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/21/13921/1

diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index 8ac5909..268794b 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -91,11 +91,7 @@
 	OSMO_STRLCPY_ARRAY(bankd->comp_id.sw_version, PACKAGE_VERSION);
 	/* FIXME: other members of app_comp_id */
 
-	/* Np lock or mutex required for the pcsc_slot_names list, as this is only
-	 * read once during bankd initialization, when the worker threads haven't
-	 * started yet */
 	INIT_LLIST_HEAD(&bankd->pcsc_slot_names);
-	OSMO_ASSERT(bankd_pcsc_read_slotnames(bankd, "bankd_pcsc_slots.csv") == 0);
 }
 
 /* create + start a new bankd_worker thread */
@@ -309,6 +305,11 @@
 	signal(SIGMAPDEL, handle_sig_mapdel);
 	signal(SIGUSR1, handle_sig_usr1);
 
+	/* Np lock or mutex required for the pcsc_slot_names list, as this is only
+	 * read once during bankd initialization, when the worker threads haven't
+	 * started yet */
+	OSMO_ASSERT(bankd_pcsc_read_slotnames(g_bankd, "bankd_pcsc_slots.csv") == 0);
+
 	/* Connection towards remsim-server */
 	rc = server_conn_fsm_alloc(g_bankd, srvc);
 	if (rc < 0) {

-- 
To view, visit https://gerrit.osmocom.org/13921
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
Gerrit-Change-Number: 13921
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190508/9eda0373/attachment-0001.html>


More information about the gerrit-log mailing list