From: Veronika H. <no...@gi...> - 2022-09-30 12:06:39
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: a39d70b5327429a6e26cab82513265a339ecda0e https://github.com/OpenSC/OpenSC/commit/a39d70b5327429a6e26cab82513265a339ecda0e Author: Veronika Hanulikova <vha...@re...> Date: 2022-09-30 (Fri, 30 Sep 2022) Changed paths: M src/libopensc/reader-pcsc.c Log Message: ----------- Keep pcsc reader flags when disconnected When the reader is removed, the reader->flags are set to SC_READER_REMOVED. card_detect_all() then frees resources and sets slot->reader to NULL. During this, sc_card_disconnect() is called, setting reader->flags to 0. In a subsequent call to card_detect_all() with the reader still removed, the corresponding slot is reclaimed, and slot->reader set back to the removed reader, but slot->events is overwritten, which causes the C_WaitForSlot() not to recognize event on the slot. |