]> TLD Linux GIT Repositories - packages/pcsc-lite.git/blob - pcsc-lite-any.patch
- merged 2.0.1 from PLD
[packages/pcsc-lite.git] / pcsc-lite-any.patch
1 --- pcsc-lite-1.5.2/src/winscard.c.orig 2009-02-06 09:46:20.000000000 +0100
2 +++ pcsc-lite-1.5.2/src/winscard.c      2009-04-02 22:54:43.137718835 +0200
3 @@ -430,6 +430,12 @@
4                         {
5                                 (void)SYS_MutexUnLock(rContext->mMutex);
6  
7 +                               /*
8 +                                * If it is set to ANY let it do any of the protocols
9 +                                */
10 +                               if (dwPreferredProtocols & SCARD_PROTOCOL_ANY_OLD)
11 +                                       dwPreferredProtocols = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1;
12 +
13                                 if (! (dwPreferredProtocols & rContext->readerState->cardProtocol))
14                                         return SCARD_E_PROTO_MISMATCH;
15                         }
16 @@ -758,6 +764,12 @@
17                         {
18                                 (void)SYS_MutexUnLock(rContext->mMutex);
19  
20 +                               /*
21 +                                * If it is set to ANY let it do any of the protocols
22 +                                */
23 +                               if (dwPreferredProtocols & SCARD_PROTOCOL_ANY_OLD)
24 +                                       dwPreferredProtocols = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1;
25 +
26                                 if (! (dwPreferredProtocols & rContext->readerState->cardProtocol))
27                                         return SCARD_E_PROTO_MISMATCH;
28                         }