Fix order of EV_* for CCID thread.

Since openpgp thread has lower priority than CCID thread, there is no
case where two consecutive messages EV_EXEC_ACK_REQUIRED and
EV_EXEC_FINISHED are handled simultaneously (openpgp thread needs to
work some time to send EV_EXEC_FINISHED, after sending
EV_EXEC_ACK_REQUIRED).  But just in case, when there are two messages
at once, EV_EXEC_ACK_REQUIRED should been handled before
EV_EXEC_FINISHED.
This commit is contained in:
NIIBE Yutaka
2018-12-07 08:35:27 +09:00
parent 8d15086d06
commit 65689199e7
2 changed files with 7 additions and 2 deletions

View File

@@ -25,8 +25,8 @@ void ccid_card_change_signal (int how);
/* CCID thread */
#define EV_RX_DATA_READY 1 /* USB Rx data available */
#define EV_EXEC_ACK_REQUIRED 2 /* OpenPGPcard Execution ACK required*/
#define EV_EXEC_FINISHED 4 /* OpenPGPcard Execution finished */
#define EV_EXEC_FINISHED 2 /* OpenPGPcard Execution finished */
#define EV_EXEC_ACK_REQUIRED 4 /* OpenPGPcard Execution ACK required */
#define EV_TX_FINISHED 8 /* CCID Tx finished */
#define EV_CARD_CHANGE 16