aboutsummaryrefslogtreecommitdiffstats
path: root/scd/apdu.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-11-05 07:10:49 +0000
committerNIIBE Yutaka <[email protected]>2020-11-05 07:10:49 +0000
commitf808012ac2cf67ec563da178d963f300a7f2564d (patch)
tree4e3c80c293f1f02a017078a38e5d98a213451f7a /scd/apdu.c
parentscd: Internal CCID driver: Fix a race condition on close. (diff)
downloadgnupg-f808012ac2cf67ec563da178d963f300a7f2564d.tar.gz
gnupg-f808012ac2cf67ec563da178d963f300a7f2564d.zip
scd: Use lock_slot for apdu_send_direct.
* scd/apdu.c (apdu_send_direct): Use lock_slot. -- 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. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/apdu.c')
-rw-r--r--scd/apdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index a29305556..8a3b5b411 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -3248,7 +3248,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);