bankd: Add hack for hard-coded slotmap
As we don't yet have any software that would dynamically install
slot mappings into bankd, let's add a bunch of them as compiled-in
defaults during bankd_init(). This must of course be removed once
the dynamic slot mapping configuration from remsim-server exists.
Change-Id: I04d6ed68c9b9bfb559a41c705884cce4394ea926
diff --git a/src/bankd_main.c b/src/bankd_main.c
index bebf521..0a54ee1 100644
--- a/src/bankd_main.c
+++ b/src/bankd_main.c
@@ -45,6 +45,17 @@
* started yet */
INIT_LLIST_HEAD(&bankd->pcsc_slot_names);
OSMO_ASSERT(bankd_pcsc_read_slotnames(bankd, "bankd_pcsc_slots.csv") == 0);
+
+ /* HACK HACK HACK */
+ {
+ struct bank_slot bs = { .bank_id = 1, };
+ struct client_slot cs = { .client_id = 23, };
+ int i;
+ for (i = 0; i < 5; i++) {
+ bs.slot_nr = cs.slot_nr = i;
+ bankd_slotmap_add(bankd, &bs, &cs);
+ }
+ }
}
/* create + start a new bankd_worker thread */