1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd: Modify DEVINFO behavior to support looping forever.

* scd/app.c (struct mrsw_lock): Add notify_cond member.
(notify_cond): Remove.
(card_list_r_lock, card_list_r_unlock): Rename.
(card_list_w_lock, card_list_w_unlock): Rename.
(card_list_signal, card_list_wait): New, fixing thinko about
notify/wakeup with MRSW lock.
(app_send_devinfo): Support looping.
(select_application): Notify app_send_devinfo thread for newly
detected device.
(initialize_module_command): Initialize notify_cond member.
(app_wait): Remove.
* scd/command.c (cmd_devinfo): Use new API of app_send_devinfo.
* scd/scdaemon.h (app_wait): Remove.

--

GnuPG-bug-id: 5359
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2021-10-29 10:48:01 +09:00
parent 50e43af3f1
commit 48e824b6ea
3 changed files with 104 additions and 79 deletions

View file

@ -155,7 +155,6 @@ int get_active_connection_count (void);
/*-- app.c --*/
int scd_update_reader_status_file (void);
void app_wait (void);
gpg_error_t app_send_devinfo (ctrl_t ctrl);
gpg_error_t app_send_devinfo (ctrl_t ctrl, int keep_looping);
#endif /*SCDAEMON_H*/