1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

2006-08-30 Marcus Brinkmann <marcus@g10code.de>

* command.c (do_reset): Delay resetting CTRL->reader_slot until
	after update_card_removed invocation.
This commit is contained in:
Marcus Brinkmann 2006-08-30 15:57:17 +00:00
parent 8ffa3b4cbb
commit 9bdb549dc4
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-08-30 Marcus Brinkmann <marcus@g10code.de>
* command.c (do_reset): Delay resetting CTRL->reader_slot until
after update_card_removed invocation.
2006-08-28 Marcus Brinkmann <marcus@g10code.de>
* app-openpgp.c (do_decipher, do_sign): Allow "OPENPGP.2"

View File

@ -212,7 +212,6 @@ do_reset (ctrl_t ctrl, int send_reset)
slot_table[slot].reset_failed = 1;
}
}
ctrl->reader_slot = -1;
/* If we hold a lock, unlock now. */
if (locked_session && ctrl->server_local == locked_session)
@ -229,12 +228,16 @@ do_reset (ctrl_t ctrl, int send_reset)
if (!pth_mutex_acquire (&status_file_update_lock, 0, NULL))
{
log_error ("failed to acquire status_fle_update lock\n");
ctrl->reader_slot = -1;
return;
}
update_reader_status_file ();
update_card_removed (slot, 0);
if (!pth_mutex_release (&status_file_update_lock))
log_error ("failed to release status_file_update lock\n");
/* Do this last, so that update_card_removed does its job. */
ctrl->reader_slot = -1;
}