aboutsummaryrefslogtreecommitdiffstats
path: root/src/sim/reader_pcsc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-10-26 18:46:50 +0100
committerHarald Welte <laforge@gnumonks.org>2014-10-26 19:50:51 +0100
commit55790aa09a8f92d437ea06b3ef2c74465612fa8b (patch)
tree749a2f2e2a009644dde4c6f4ecd9c8384d006dce /src/sim/reader_pcsc.c
parent586d710e0586a51ba19b71bf20f2bb12aa8c0aeb (diff)
sim: Prepare infrastructure for protocols != T=0 and other drivers
Diffstat (limited to 'src/sim/reader_pcsc.c')
-rw-r--r--src/sim/reader_pcsc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sim/reader_pcsc.c b/src/sim/reader_pcsc.c
index c5b8112b..5e670912 100644
--- a/src/sim/reader_pcsc.c
+++ b/src/sim/reader_pcsc.c
@@ -97,13 +97,17 @@ end:
return NULL;
}
-static struct osim_card_hdl *pcsc_card_open(struct osim_reader_hdl *rh)
+static struct osim_card_hdl *pcsc_card_open(struct osim_reader_hdl *rh,
+ enum osim_proto proto)
{
struct pcsc_reader_state *st = rh->priv;
struct osim_card_hdl *card;
struct osim_chan_hdl *chan;
LONG rc;
+ if (proto != OSIM_PROTO_T0)
+ return NULL;
+
rc = SCardConnect(st->hContext, st->name, SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T0, &st->hCard, &st->dwActiveProtocol);
PCSC_ERROR(rc, "SCardConnect");