scd: Only submit apdu_get_status when needed.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 26 Jan 2017 13:02:41 +0000 (22:02 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 26 Jan 2017 13:02:41 +0000 (22:02 +0900)
commit881dcdfd84ebad36bff20c895e629025bed9d94e
tree09cd09205463d53951090ea06a943172770c4c00
parent9b06633c811e8815c07d744f20b45405cb082367
scd: Only submit apdu_get_status when needed.

* scd/apdu.c (apdu_dev_list_finish): Return Boolean value if
all device support INTERRUPT transfer.
* scd/ccid-driver.c (ccid_dev_scan_finish): Likewise.
* scd/app.c (app_new_register): Fix initial value of card_status.
(select_application): Call update_fdset_for_usb.
(scd_update_reader_status_file): Ditto.
* scd/scdaemon.c (update_fdset_for_usb, need_tick): New.
(handle_connections): Call handle_tick when select returns.
Let select watch USB file descriptors, too.
Call libusb_handle_events_timeout_completed for INTERRUPT transfer.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/apdu.c
scd/apdu.h
scd/app.c
scd/ccid-driver.c
scd/ccid-driver.h
scd/scdaemon.c
scd/scdaemon.h