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
This commit is contained in:
parent
3afbf73564
commit
e89fecda6a
|
@ -91,11 +91,7 @@ static void bankd_init(struct bankd *bankd)
|
|||
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 @@ int main(int argc, char **argv)
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue