From 7215a6ed3f8d0ec64aa289c92180c45f615603a6 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Sun, 17 May 2015 22:04:06 +0200 Subject: [PATCH] announce non thread safety --- virtualsmartcard/src/ifd-vpcd/ifd-vpcd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/virtualsmartcard/src/ifd-vpcd/ifd-vpcd.c b/virtualsmartcard/src/ifd-vpcd/ifd-vpcd.c index fb1443e..09824e5 100644 --- a/virtualsmartcard/src/ifd-vpcd/ifd-vpcd.c +++ b/virtualsmartcard/src/ifd-vpcd/ifd-vpcd.c @@ -258,7 +258,24 @@ IFDHGetCapabilities (DWORD Lun, DWORD Tag, PDWORD Length, PUCHAR Value) *Length = 1; break; + case TAG_IFD_THREAD_SAFE: + if (*Length < 1) { + Log1(PCSC_LOG_ERROR, "Invalid input data"); + goto err; + } + + /* We are not thread safe due to + * the global hostname and ctx */ + *Value = 0; + *Length = 1; + break; + case TAG_IFD_SLOT_THREAD_SAFE: + if (*Length < 1) { + Log1(PCSC_LOG_ERROR, "Invalid input data"); + goto err; + } + /* driver supports access to multiple slots of the same reader at * the same time */ *Value = 1;