summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRostislav Kondratenko <r.kondratenko@wwpass.com>2018-04-05 17:43:24 +0300
committerAlexander Zakharov <uglym8@gmail.com>2018-04-27 13:46:45 +0300
commit58f855a3a23ad8861ee8dbec943322049b9fd69b (patch)
treea4471d3456af581be0c26bb8e774521285c5f9ac
parent2abd25ae2a5eb1a1c1bdf86529d8bae102017289 (diff)
downloadrdesktop-58f855a3a23ad8861ee8dbec943322049b9fd69b.zip
Enable PnP sc reader notifications
-rw-r--r--configure.ac4
-rw-r--r--scard.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6c9fe41..6ac9432 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,6 +218,10 @@ AS_IF([test "x$enable_smartcard" != "xno"], [
exit 1
fi
+ AC_MSG_CHECKING([for PCSC-lite >= 1.6.0 (PnP/Notifications support)])
+ PKG_CHECK_MODULES(PNP_NOTIFICATIONS, libpcsclite >= 1.6.0, [WITH_PNP_NOTIFICATIONS=1], [WITH_PNP_NOTIFICATIONS=0])
+ AC_DEFINE(WITH_PNP_NOTIFICATIONS)
+
AC_MSG_CHECKING([for old version of PCSC])
AC_TRY_LINK([
#include <stdlib.h>
diff --git a/scard.c b/scard.c
index 229e5cd..ad55096 100644
--- a/scard.c
+++ b/scard.c
@@ -1232,8 +1232,10 @@ TS_SCardGetStatusChange(STREAM in, STREAM out, RD_BOOL wide)
inString(&lcHandle, in, (char **) &(cur->szReader),
dataLength, wide));
+#if !WITH_PNP_NOTIFICATIONS
if (strcmp(cur->szReader, "\\\\?PnP?\\Notification") == 0)
cur->dwCurrentState |= SCARD_STATE_IGNORE;
+#endif
}
logger(SmartCard, Debug,