Patch for scdaemon and reader/smartcard combo devices
NIIBE Yutaka
gniibe at fsij.org
Fri Jan 21 01:52:57 CET 2011
The patch for scd/command.c couldn't be applied for me.
What branch are you working? I have tried your patch to
STABLE-BRANCH-2-0 and master, but it failed for both cases.
2011-01-20 13:51, Grant Olson wrote:
> diff --git a/scd/command.c b/scd/command.c
> index e2cd1f5..d31d7af 100644
> --- a/scd/command.c
> +++ b/scd/command.c
> @@ -401,6 +401,14 @@ get_reader_slot (void)
> {
> int no_service_flag;
> ss->slot = apdu_open_reader (opt.reader_port, &no_service_flag);
> +
> + /* If we still don't have a slot, we have no readers.
> + Invalidate for now until a reader is attached. */
> + if(ss->slot == -1)
> + {
> + ss->valid = 0;
> + }
> +
> if (no_service_flag)
> {
> log_info ("no card services - disabling scdaemon\n");
> @@ -2192,6 +2200,8 @@ update_reader_status_file (int set_card_removed_flag)
> if (sw_apdu == SW_HOST_NO_READER)
> {
> /* Most likely the _reader_ has been unplugged. */
> + apdu_close_reader(ss->slot);
> + ss->valid = 0;
> status = 0;
> changed = ss->changed;
> }
--
More information about the Gnupg-devel
mailing list