aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2020-11-05 16:10:49 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2020-11-05 16:10:49 +0900
commitf808012ac2cf67ec563da178d963f300a7f2564d (patch)
tree4e3c80c293f1f02a017078a38e5d98a213451f7a
parent484bafda4dbf5ffe9e7c41ef24fbc5bd791a3b32 (diff)
downloadgnupg-f808012ac2cf67ec563da178d963f300a7f2564d.tar.gz
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 <gniibe@fsij.org>
-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);