Ludovic Rousseau wrote:
> On 16/06/06, Karsten Ohme <[EMAIL PROTECTED]> wrote:
> 
>> Scott Moynes wrote:
>> > Karsten Ohme wrote:
>> >
>> >>
>> >>
>> >> I believe the problem is the following:
>> >>
>> >> Usually the context should only released, if the library is unloaded.
>> >> But SCardReleaseContext is called in the Release function, that means
>> >> not only the connection to the card is closed, but also the connection
>> >> to the resource manager of the system. So, the value of the handle
>> >> localHContext is also invalid, because it is a value, which context
>> was
>> >> destroyed. So an error occurs.
>> >> Set localHContext to 0 is not necessary, because the context should be
>> >> cached, so the solution, which would fit better the idea of
>> caching, is
>> >> to remove the whole SCardReleaseContext branch, the disconnection is
>> >> enough.
>> >>
>> >> I think, I have not such problem.
>> >>
>> >>
>> >
>> > I agree that if the SCardReleaseContext is not called, then
>> > localHContext does not need to be cleared and remains valid. Indeed,
>> > this is what previous beta releases did and our software works fine
>> with
>> > those releases, but the context release was added so I could only
>> assume
>> > that there is some reason for this.
> 
> 
> The call to SCardReleaseContext() in MSCReleaseConnection() was added
> in changeset 1416 [1] after a patch sent by Karsten Ohme.
> 
>> I'm not sure, the fini function with the destructor is rather new and
>> maybe it is a relic from former times. (?)
> 
> 
> The fini function was added in changeset 1432 [2] after a patch from
> Karsten Ohme.
> 
> Kartsen has a commit access right so I let him solve this problem (if
> it is a problem).

OK, I just tried. But my I cannot check it out, I try later again, maybe
something wrong with the server.

Karsten
> 
> Bye,
> 
> [1]
> http://svn.debian.org/wsvn/pcsclite/trunk/libmusclecard/src/?rev=1416&sc=1
> [2]
> http://svn.debian.org/wsvn/pcsclite/trunk/libmusclecard/src/?rev=1432&sc=1
> 

_______________________________________________
Muscle mailing list
Muscle@lists.musclecard.com
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to