mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-04 22:57:47 +02:00
scd: Use lock_slot for apdu_send_direct.
* scd/apdu.c (apdu_send_direct): Use lock_slot.
--
Cherry-pick the master commit of:
f808012ac2
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 <gniibe@fsij.org>
This commit is contained in:
parent
2f2130ff24
commit
3c3765405d
|
@ -3267,7 +3267,7 @@ apdu_send_direct (int slot, size_t extended_length,
|
||||||
}
|
}
|
||||||
#undef SHORT_RESULT_BUFFER_SIZE
|
#undef SHORT_RESULT_BUFFER_SIZE
|
||||||
|
|
||||||
if ((sw = trylock_slot (slot)))
|
if ((sw = lock_slot (slot)))
|
||||||
{
|
{
|
||||||
xfree (apdu_buffer);
|
xfree (apdu_buffer);
|
||||||
xfree (result_buffer);
|
xfree (result_buffer);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user