diff options
author | NIIBE Yutaka <[email protected]> | 2020-11-05 07:10:49 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-02-17 05:05:01 +0000 |
commit | 3c3765405de02b9a57fdc9a3cf901f6e3aca8586 (patch) | |
tree | 58cbdd2f4f564ecf84ac068c7c431d8b35b30307 | |
parent | gpgconf: Do not show "quiet" as option. (diff) | |
download | gnupg-3c3765405de02b9a57fdc9a3cf901f6e3aca8586.tar.gz gnupg-3c3765405de02b9a57fdc9a3cf901f6e3aca8586.zip |
scd: Use lock_slot for apdu_send_direct.
* scd/apdu.c (apdu_send_direct): Use lock_slot.
--
Cherry-pick the master commit of:
f808012ac2cf67ec563da178d963f300a7f2564d
With trylock_slot, it may return SW_HOST_BUSY. This may occur when
apdu_get_status is called by scd_update_reader_status_file.
Simply using lock_slot is much easier for user of apdu_send_direct.
GnuPG-bug-id: 5831
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | scd/apdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index 6d7f59dd1..8c8f7aa6a 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -3267,7 +3267,7 @@ apdu_send_direct (int slot, size_t extended_length, } #undef SHORT_RESULT_BUFFER_SIZE - if ((sw = trylock_slot (slot))) + if ((sw = lock_slot (slot))) { xfree (apdu_buffer); xfree (result_buffer); |