Bug 7332 - incorrect use of g_cond_wait() in pcsctun
Summary: incorrect use of g_cond_wait() in pcsctun
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Smart card (show other bugs)
Target Milestone: 4.10.1
Assignee: Pierre Ossman
Keywords: prosaic, samuel_tester
Depends on:
Reported: 2019-04-10 15:41 CEST by Pierre Ossman
Modified: 2019-06-07 15:19 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Description Pierre Ossman cendio 2019-04-10 15:41:45 CEST
I was debugging smart card issues with thunderbird and saw lots of random SCARD_E_NO_SERVICE in the logs. Turned out that this was because of communication errors in pcsctun. That in turn was because g_cond_wait() was returning even though the request had not yet completed.

Turns out that this is a documented behaviour for it and it is required to run it in a loop until you can verify the transaction is done.
Comment 2 Pierre Ossman cendio 2019-04-10 16:12:58 CEST

Tester should run Thunderbird with PCSCTUN_DEBUG=all and OPENSC_DEBUG=9 and look for 0x8010001d in the output. ThinLinc 4.10.0 should have it, but not the new code.

I did not see any tangible functional changes, so the debug log is the only known way to test.
Comment 3 Samuel Mannehed cendio 2019-04-17 13:40:44 CEST
Looks good.

Could reproduce with 4.10.0, but can no longer see the 0x8010001d error after upgrading to a nightly build. Was running "PCSCTUN_DEBUG=all OPENSC_DEBUG=9 thunderbird" in a ThinLinc session with smart card redirection activated.

Note You need to log in before you can comment on or make changes to this bug.