bankd: Add app_comp_id to use repro_util helpers

Change-Id: Ie981388220ed0612e427d076f8741fec73e6026b
This commit is contained in:
Harald Welte 2018-09-24 14:54:23 +02:00
parent 417b961ef2
commit f1dd16291e
2 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,8 @@
#include <osmocom/core/linuxlist.h>
#include "rspro_util.h"
struct bankd;
struct bank_slot {
@ -128,6 +130,8 @@ struct bankd {
uint16_t bank_id;
} cfg;
struct app_comp_id comp_id;
/* TCP socket at which we are listening */
int accept_fd;

View File

@ -40,6 +40,12 @@ static void bankd_init(struct bankd *bankd)
INIT_LLIST_HEAD(&bankd->workers);
pthread_mutex_init(&bankd->workers_mutex, NULL);
bankd->comp_id.type = ComponentType_remsimBankd;
OSMO_STRLCPY_ARRAY(bankd->comp_id.name, "fixme-name");
OSMO_STRLCPY_ARRAY(bankd->comp_id.software, "remsim-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 */