aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2021-07-22 02:22:47 +0000
committerNIIBE Yutaka <[email protected]>2021-07-22 02:22:47 +0000
commit5c8124b8b9554c7843feccf408648c9689bce243 (patch)
treec2f004c3e564f8ca2bb853d2668da7d17cdd402e /scd/command.c
parentscd: Fix direct use of card with no ctrl->card_ctx. (diff)
downloadgnupg-5c8124b8b9554c7843feccf408648c9689bce243.tar.gz
gnupg-5c8124b8b9554c7843feccf408648c9689bce243.zip
scd: Small clean up for card access.
* scd/app.c (app_get_challenge): Remove the check to ref_count. * scd/command.c (send_client_notifications): Update comments. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/scd/command.c b/scd/command.c
index 5ba71a4aa..0819318e7 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -2851,8 +2851,16 @@ popup_prompt (void *opaque, int on)
}
-/* Helper to send the clients a status change notification. Note that
- * this function assumes that APP is already locked. */
+/*
+ * Helper to send the clients a status change notification.
+ *
+ * When it's removal of card, this function also clean up all
+ * references by ctrl->card_ctx of all sessions.
+ *
+ * Note that this function assumes that all accesses to cards and
+ * applications are locked. By the mrsw-lock, it is guaranteed that
+ * no card/app is accessed, when this function is called..
+ */
void
send_client_notifications (card_t card, int removal)
{