scd: Simplify monitoring card removal.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 28 Dec 2016 02:14:29 +0000 (11:14 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 28 Dec 2016 02:14:29 +0000 (11:14 +0900)
commitf9882d8336feea96e3b5e250e9093f8cca01e08b
tree28a62c8b56747e5ebd1d38fcb6abd63e354f8644
parentc7ec9c42246033e14ebad679d11f3b1fbeed23b7
scd: Simplify monitoring card removal.

* scd/apdu.c (struct reader_table_s): Remove any_status, last_status,
status, and change_counter field.
(new_reader_slot, dump_reader_status, ct_activate_card, open_ct_reader)
(connect_pcsc_card, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
(open_ccid_reader, apdu_reset): Follow the change.
(ct_dump_reader_status): Remove.
(apdu_get_status_internal, apdu_get_status): Remove CHANGED arg.
(apdu_connect): Follow the change.
* scd/command.c (struct vreader_s): Remove reset_failed, any, and
changed field.
(cmd_getinfo, update_reader_status_file): Follow the change.

--

In the past, scdaemon monitors card insertion (as well as removal), so
the code has been complicated, and there has been duplication in two
layers.  Now, it only monitors card removal, it's now simplified.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/apdu.c
scd/apdu.h
scd/command.c