mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Fix "Conflicting usage" bug.
* scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we got an error from apdu_disconnect. * scd/app-common.h (no_reuse): Remove. * scd/app.c (application_notify_card_reset): Deallocate APP here. (select_application, release_application): Don't use NO_REUSE. -- Reproducible scenario: Invoke gpg --card-edit session from a terminal. Invoke another gpg --card-edit session from another. Remove a token. Insert a token again. Type RET on both terminals. One of terminal answers "Conflicting usage". Perhaps, having NO_REUSE field was to avoid race conditions. Now, APP can be safely deallocated by application_notify_card_reset. Thanks to the2nd.
This commit is contained in:
parent
11b2691edd
commit
f42c50dbf0
3 changed files with 11 additions and 28 deletions
|
@ -47,11 +47,6 @@ struct app_ctx_s {
|
|||
operations the particular function pointer is set to NULL */
|
||||
unsigned int ref_count;
|
||||
|
||||
/* Flag indicating that a reset has been done for that application
|
||||
and that this context is merely lingering and just should not be
|
||||
reused. */
|
||||
int no_reuse;
|
||||
|
||||
/* Used reader slot. */
|
||||
int slot;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue