<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-06-14 11:43 GMT+02:00 Ran Benita <span dir="ltr"><<a href="mailto:ran234@gmail.com" target="_blank">ran234@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br></blockquote><div><br></div><div>Hello,<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I have noticed a change in behavior in one of the recent pcsclite<br>
releases. I am using pcsclite 1.8.21 and ccid 1.4.27 on ArchLinux.<br>
<br>
The program below calls a blocking SCardGetStatusChange, but before that<br>
spwans a thread which waits for a key press, then calls SCardCancel (on<br>
the same context). It is a port of the Rust program here:<br>
<a href="https://raw.githubusercontent.com/bluetech/pcsc-rust/01bd4d80e366ef00f7006dabee45c8cb356d8566/pcsc/examples/cancel.rs" rel="noreferrer" target="_blank">https://raw.githubusercontent.<wbr>com/bluetech/pcsc-rust/<wbr>01bd4d80e366ef00f7006dabee45c8<wbr>cb356d8566/pcsc/examples/<wbr>cancel.rs</a><br>
<br>
Previously, the SCardCancel would return immediately and would cause<br>
SCardGetStatusChange to return SCARD_E_CANCELLED immediately.<br>
<br>
Now, SCardCancel blocks until SCardGetStatusChange times out, and only<br>
then returns SCARD_S_SUCCESS.<br>
<br>
Is this an intended change, or a regression? Or maybe I'm doing<br>
something wrong?<br></blockquote><div><br></div><div>No. Your sample code is correct.<br clear="all"></div></div>The bug is in pcsc-lite since 1.8.21 (latest version).<br>More precisely at this line: <a href="https://github.com/LudovicRousseau/PCSC/commit/9a21c82330fc4b73ac00faf2c5cf948da5f8ab07#diff-320fdf2286b77c3aa12e4f0c174a5ac1L3082">https://github.com/LudovicRousseau/PCSC/commit/9a21c82330fc4b73ac00faf2c5cf948da5f8ab07#diff-320fdf2286b77c3aa12e4f0c174a5ac1L3082</a><br><br></div><div class="gmail_extra">It is now fixed in <a href="https://github.com/LudovicRousseau/PCSC/commit/7a3738d2f8e48c669b0e3f485cb9dcabeffc941a">https://github.com/LudovicRousseau/PCSC/commit/7a3738d2f8e48c669b0e3f485cb9dcabeffc941a</a><br><br></div><div class="gmail_extra">I will release a new pcsc-lite soon.<br><br></div><div class="gmail_extra">Thanks for the bug report.<br></div><div class="gmail_extra">Bye<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">-- <br><div class="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>