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
This commit is contained in:
Harald Welte 2018-09-23 19:31:55 +02:00
parent 796a7492c7
commit e72e57383d
1 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,17 @@ static void bankd_init(struct bankd *bankd)
* 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 */