On 17/03/2013 10:44, Ludovic Rousseau wrote:
> 2013/3/15 Francois Grieu <[email protected]>:
>> in a piece of software that I maintain, I came across cases where a handle
>> obtained from SCardConnect is passed to SCardDisconnect (..)
>> but then nevertheless used for another SCardDisconnect, SCardReconnect,
>> ScardTransmit, or a ScardControl.
>
> You should get an error SCARD_E_INVALID_HANDLE on the second call to
> SCardDisconnect.
> Isn't that the case?
I can only guess so (error handling was such that the error was 
indistinguishable
from mute card in the error report, and I fixed the problem rather than pursue 
its
analysis). At least there was no obvious disaster, nothing reached the card, and
some error reported. The code was running under (virtualized) Windows XP,
with no pcsc-lite in sight.

>> Is this definitely a bug?
> In your application, yes.
Thanks, that was my question. I could not find any clear statement that any
use of the handle after it was passed to SCardDisconnect is an error.
Seem so obvious as being untold, yet I guess the mistake is not uncommon.

>> If yes, what is the likely behavior with PCSC-Lite? With Windows?
> I can't say about Windows. I guess it is the same.
>
> What version of pcsc-lite are you using?
In that particular case: none. Generally: the one bundled with whatever distro
(often RedHat or CentOS) my code happens to run on. BTW, thanks to your
good work, lately, it tends to work fine as bundled, with the notable exception
of interferences with other client applications using pcsc-lite, e.g. for 
automated
logon.

  Francois Grieu

_______________________________________________
Muscle mailing list
[email protected]
http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com

Reply via email to