Enable PnP sc reader notifications

This commit is contained in:
Rostislav Kondratenko 2018-04-05 17:43:24 +03:00 committed by Alexander Zakharov
parent 2abd25ae2a
commit 58f855a3a2
2 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,10 @@ AS_IF([test "x$enable_smartcard" != "xno"], [
exit 1 exit 1
fi 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_MSG_CHECKING([for old version of PCSC])
AC_TRY_LINK([ AC_TRY_LINK([
#include <stdlib.h> #include <stdlib.h>

View File

@ -1232,8 +1232,10 @@ TS_SCardGetStatusChange(STREAM in, STREAM out, RD_BOOL wide)
inString(&lcHandle, in, (char **) &(cur->szReader), inString(&lcHandle, in, (char **) &(cur->szReader),
dataLength, wide)); dataLength, wide));
#if !WITH_PNP_NOTIFICATIONS
if (strcmp(cur->szReader, "\\\\?PnP?\\Notification") == 0) if (strcmp(cur->szReader, "\\\\?PnP?\\Notification") == 0)
cur->dwCurrentState |= SCARD_STATE_IGNORE; cur->dwCurrentState |= SCARD_STATE_IGNORE;
#endif
} }
logger(SmartCard, Debug, logger(SmartCard, Debug,