mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
9b06633c81
commit
881dcdfd84
7 changed files with 145 additions and 42 deletions
11
scd/apdu.c
11
scd/apdu.c
|
@ -2970,15 +2970,22 @@ apdu_dev_list_start (const char *portstr, struct dev_list **l_p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
apdu_dev_list_finish (struct dev_list *dl)
|
||||
{
|
||||
int all_have_intr_endp;
|
||||
|
||||
#ifdef HAVE_LIBUSB
|
||||
if (dl->ccid_table)
|
||||
ccid_dev_scan_finish (dl->ccid_table, dl->idx_max);
|
||||
all_have_intr_endp = ccid_dev_scan_finish (dl->ccid_table, dl->idx_max);
|
||||
else
|
||||
all_have_intr_endp = 0;
|
||||
#else
|
||||
all_have_intr_endp = 0;
|
||||
#endif
|
||||
xfree (dl);
|
||||
npth_mutex_unlock (&reader_table_lock);
|
||||
return all_have_intr_endp;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue