mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
scd: Fix for --disable-ccid for scdaemon.
* scd/apdu.c (apdu_dev_list_finish): Don't call ccid_dev_scan_finish with no table. (apdu_open_reader): Only increment when it's zero. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
62268a2732
commit
858e14cd79
@ -2974,6 +2974,7 @@ void
|
||||
apdu_dev_list_finish (struct dev_list *dl)
|
||||
{
|
||||
#ifdef HAVE_LIBUSB
|
||||
if (dl->ccid_table)
|
||||
ccid_dev_scan_finish (dl->ccid_table, dl->idx_max);
|
||||
#endif
|
||||
xfree (dl);
|
||||
@ -3195,15 +3196,15 @@ apdu_open_reader (struct dev_list *dl)
|
||||
else
|
||||
#endif
|
||||
{ /* PC/SC readers. */
|
||||
if (dl->idx++ == 0)
|
||||
if (dl->idx == 0)
|
||||
{
|
||||
dl->idx++;
|
||||
slot = apdu_open_one_reader (dl->portstr);
|
||||
}
|
||||
else
|
||||
slot = -1;
|
||||
}
|
||||
|
||||
if (DBG_READER)
|
||||
log_debug ("leave: apdu_open_reader => slot=%d [ccid]\n", slot);
|
||||
|
||||
return slot;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user