<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1433314360613_3066">Hi,<br><span></span></div><div id="yui_3_16_0_1_1433314360613_3167"><span><br></span></div><div id="yui_3_16_0_1_1433314360613_3169"><span id="yui_3_16_0_1_1433314360613_3168">Sorry for being tiresome but thinking about this issue I think we have only two ways of going:</span></div><div id="yui_3_16_0_1_1433314360613_3170"><br><span></span></div><div id="yui_3_16_0_1_1433314360613_3172" dir="ltr"><span id="yui_3_16_0_1_1433314360613_3171">1.- pcsc-lite changes SCardReconnect to release the locks and perform as windows implementation does. This option changes how the software works right now and can trigger another problems in other projects that depend on it. Besides it wouldn't solve pcsc on mac (I think pcsc on mac forked an older pcsc-lite version, so I suppose it has the same behavior, SCardReconnect does not release the locks).</span></div><div id="yui_3_16_0_1_1433314360613_3231" dir="ltr"><br><span id="yui_3_16_0_1_1433314360613_3171"></span></div><div id="yui_3_16_0_1_1433314360613_3248" dir="ltr"><span id="yui_3_16_0_1_1433314360613_3171">2.- opensc adds some "ifdef _WIN32" to add or not add the lock after a SCardReconnect. I suppose it would be something similar to the patch attached (comments are welcomed).</span></div><div id="yui_3_16_0_1_1433314360613_3344" dir="ltr"><br><span id="yui_3_16_0_1_1433314360613_3171"></span></div><div id="yui_3_16_0_1_1433314360613_3345" dir="ltr"><span id="yui_3_16_0_1_1433314360613_3171">Ludovic, it is up to you. You can consider better than me which one is the better approach. If you think it is better to patch opensc to act differently depending windows or not windows I will try to submit a pull requests to opensc referencing bug #475.<br></span></div><div id="yui_3_16_0_1_1433314360613_3580" dir="ltr"><br><span id="yui_3_16_0_1_1433314360613_3171"></span></div><div id="yui_3_16_0_1_1433314360613_3569" dir="ltr"><span id="yui_3_16_0_1_1433314360613_3171">Thank you very much in deep.<br></span></div><div id="yui_3_16_0_1_1433314360613_3330" dir="ltr"><span id="yui_3_16_0_1_1433314360613_3171"><br></span></div><div id="yui_3_16_0_1_1433314360613_3247" dir="ltr"><br><span id="yui_3_16_0_1_1433314360613_3171"></span></div><div id="yui_3_16_0_1_1433314360613_3294" dir="ltr"><span id="yui_3_16_0_1_1433314360613_3171"></span></div><br>  <div id="yui_3_16_0_1_1433314360613_3086" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1433314360613_3085" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1433314360613_3084" dir="ltr"> <hr id="yui_3_16_0_1_1433314360613_3175" size="1">  <font id="yui_3_16_0_1_1433314360613_3087" size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Ricardo Martin <rickyepoderi@yahoo.es><br> <b><span style="font-weight: bold;">To:</span></b> Talks about MUSCLE <pcsclite-muscle@lists.alioth.debian.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, June 2, 2015 11:55 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Pcsclite-muscle] question about locking and reconnect<br> </font> </div> <div id="yui_3_16_0_1_1433314360613_3090" class="y_msg_container"><br><div id="yiv5876360253"><div id="yui_3_16_0_1_1433314360613_3089"><div id="yui_3_16_0_1_1433314360613_3088" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div id="yiv5876360253yui_3_16_0_1_1433233626859_15592">Hi again,</div><div id="yiv5876360253yui_3_16_0_1_1433233626859_15591"><br clear="none"></div><div dir="ltr" id="yiv5876360253yui_3_16_0_1_1433233626859_15517">In my little understanding the idea behind SCardReconnect is that it is just a SCardDisconnect + SCardConnect. And, because SCardDisconnect releases any lock, SCardReconnect should also do the same. If you want to lock you need to start the transaction again just like after a normal SCardConnect (in shared mode of course).</div><div dir="ltr" id="yiv5876360253yui_3_16_0_1_1433233626859_16133"><br clear="none"></div><div dir="ltr" id="yiv5876360253yui_3_16_0_1_1433233626859_15985">Regards!<br clear="none"></div></div></div></div></div> </div> </div>  </div></body></html>