diff --git a/scd/app-common.h b/scd/app-common.h index d3d8869fa..3925eacf7 100644 --- a/scd/app-common.h +++ b/scd/app-common.h @@ -70,13 +70,18 @@ typedef enum } apptype_t; -/* Formeard declararion. */ +/* Forward declarations. */ +struct card_ctx_s; +struct app_ctx_s; struct app_local_s; /* Defined by all app-*.c. */ +typedef struct card_ctx_s *card_t; +typedef struct app_ctx_s *app_t; + /* The object describing a card. */ struct card_ctx_s { - struct card_ctx_s *next; + card_t next; npth_mutex_t lock; @@ -114,7 +119,7 @@ struct card_ctx_s { * several applications and it is usuallay required to explicity * switch between applications. */ struct app_ctx_s { - struct app_ctx_s *next; + app_t next; card_t card; /* Link back to the card. */ diff --git a/scd/app-dinsig.c b/scd/app-dinsig.c index d02938cb1..16a82ade4 100644 --- a/scd/app-dinsig.c +++ b/scd/app-dinsig.c @@ -81,7 +81,6 @@ #include "../common/i18n.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" diff --git a/scd/app-geldkarte.c b/scd/app-geldkarte.c index 4589f3da6..15b38194d 100644 --- a/scd/app-geldkarte.c +++ b/scd/app-geldkarte.c @@ -39,7 +39,6 @@ #include "../common/i18n.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" diff --git a/scd/app-help.c b/scd/app-help.c index 59221ea9c..e3ad74434 100644 --- a/scd/app-help.c +++ b/scd/app-help.c @@ -24,7 +24,6 @@ #include #include "scdaemon.h" -#include "app-common.h" #include "iso7816.h" #include "../common/tlv.h" diff --git a/scd/app-nks.c b/scd/app-nks.c index 3f985c24a..0651e5d57 100644 --- a/scd/app-nks.c +++ b/scd/app-nks.c @@ -53,7 +53,6 @@ #include "scdaemon.h" #include "../common/i18n.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" #include "apdu.h" #include "../common/host2net.h" diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index b93b7b557..c301f8218 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -54,7 +54,6 @@ #include "../common/util.h" #include "../common/i18n.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" #include "../common/host2net.h" #include "../common/openpgpdefs.h" diff --git a/scd/app-p15.c b/scd/app-p15.c index 3b7233926..9cd423ee6 100644 --- a/scd/app-p15.c +++ b/scd/app-p15.c @@ -38,7 +38,6 @@ #include "scdaemon.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" #include "apdu.h" /* fixme: we should move the card detection to a separate file */ diff --git a/scd/app-piv.c b/scd/app-piv.c index 331f914bb..c1bc79435 100644 --- a/scd/app-piv.c +++ b/scd/app-piv.c @@ -61,7 +61,6 @@ #include "../common/util.h" #include "../common/i18n.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" #include "../common/host2net.h" #include "apdu.h" /* We use apdu_send_direct. */ diff --git a/scd/app-sc-hsm.c b/scd/app-sc-hsm.c index d18a1a737..87e58d984 100644 --- a/scd/app-sc-hsm.c +++ b/scd/app-sc-hsm.c @@ -33,7 +33,6 @@ #include "scdaemon.h" #include "iso7816.h" -#include "app-common.h" #include "../common/tlv.h" #include "apdu.h" diff --git a/scd/app.c b/scd/app.c index ef9e993d3..d9b762994 100644 --- a/scd/app.c +++ b/scd/app.c @@ -26,7 +26,6 @@ #include "scdaemon.h" #include "../common/exechelp.h" -#include "app-common.h" #include "iso7816.h" #include "apdu.h" #include "../common/tlv.h" diff --git a/scd/command.c b/scd/command.c index 1c8338446..3c63ef5fd 100644 --- a/scd/command.c +++ b/scd/command.c @@ -33,7 +33,6 @@ #include "scdaemon.h" #include #include -#include "app-common.h" #include "iso7816.h" #include "apdu.h" /* Required for apdu_*_reader (). */ #include "atr.h" diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 42efb4c37..e89569e5d 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -46,7 +46,6 @@ #include "../common/i18n.h" #include "../common/sysutils.h" -#include "app-common.h" #include "iso7816.h" #include "apdu.h" #include "ccid-driver.h" diff --git a/scd/scdaemon.h b/scd/scdaemon.h index f4a243703..d9c476d52 100644 --- a/scd/scdaemon.h +++ b/scd/scdaemon.h @@ -30,6 +30,8 @@ #include #include "../common/util.h" #include "../common/sysutils.h" +#include "app-common.h" + /* To convey some special hash algorithms we use algorithm numbers reserved for application use. */ @@ -112,8 +114,6 @@ struct server_control_s } in_data; }; -typedef struct card_ctx_s *card_t; -typedef struct app_ctx_s *app_t; /*-- scdaemon.c --*/ void scd_exit (int rc);