• Ludovic Rousseau's avatar
    Fix SCardGetStatusChange() broken in a previous patch 984f84df · 54224a4c
    Ludovic Rousseau authored
    The patch in 984f84df broke the
    execution of SCardGetStatusChange() when SCardCancel() is used.
    
    The client was waiting for a message that was never sent by the server.
    
    Fortunately the broken code was never released in a stable version of
    pcsc-lite.
    
    Thanks to Sam Van Den Berge for the bug report
    "[Pcsclite-muscle] SCardCancel broken"
    http://lists.infradead.org/pipermail/pcsclite-muscle/2018-July/001096.html
    
    Hello,
    
    It seems like SCardGetStatusChange is currently broken.
    This can be tested with UnitaryTests/SCardCancel.
    
    Before commit 984f84df:
    
    $ LD_LIBRARY_PATH=../src/.libs/ ./SCardCancel
    SCardEstablishContext:[0x00000000] Command successful.
    Press Enter to cancel within 3 seconds
    Entering blocking call
    
    Calling SCardCancel...
    SCardGetStatusChange:[0x80100002] Command cancelled.
    Blocking call canceled
    Good
    SCardCancel:[0x00000000] Command successful.
    SCardReleaseContext:[0x00000000] Command successful.
    Waiting thread...
    
    After commit 984f84df:
    
    $ LD_LIBRARY_PATH=../src/.libs/ ./SCardCancel
    SCardEstablishContext:[0x00000000] Command successful.
    Press Enter to cancel within 3 seconds
    Entering blocking call
    
    Calling SCardCancel...
    SCardCancel:[0x00000000] Command successful.
    
    <<<<<<<<< SCardGetStatusChange hangs here >>>>>>>>>
    
    I don't have a fix but I just wanted to report this. Besides this big
    thank you for all your great work!
    
    Kr,
    Sam.
    54224a4c
Name
Last commit
Last update
UnitaryTests Loading commit data...
doc Loading commit data...
etc Loading commit data...
m4 Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
GPL-3.0.txt Loading commit data...
HELP Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.md Loading commit data...
SECURITY Loading commit data...
TODO Loading commit data...
bootstrap Loading commit data...
c.sh Loading commit data...
clang-analyze.sh Loading commit data...
configure.ac Loading commit data...
splint.sh Loading commit data...
stamp-h.in Loading commit data...