[Gpg4win-commits] r1622 - in trunk: . patches patches/gnupg2-2.0.17
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jan 26 08:57:38 CET 2011
Author: werner
Date: 2011-01-26 08:57:38 +0100 (Wed, 26 Jan 2011)
New Revision: 1622
Added:
trunk/patches/gnupg2-2.0.17/
trunk/patches/gnupg2-2.0.17/01-scd-reader-removal.patch
Modified:
trunk/Makefile.am
Log:
Fix for plugable reader-card combos
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2011-01-24 17:00:15 UTC (rev 1621)
+++ trunk/Makefile.am 2011-01-26 07:57:38 UTC (rev 1622)
@@ -66,6 +66,7 @@
patches/gnupg2-2.0.16/04-gpgtar-2.patch \
patches/gnupg2-2.0.16/05-err-codes.patch \
patches/gnupg2-2.0.16/06-reread-agent.patch \
+ patches/gnupg2-2.0.17/01-scd-reader-removal.patch \
patches/dirmngr-1.0.3/01-ldaphttp.patch \
patches/dirmngr-1.1.0/01-mmap.patch \
patches/gpgol-0.9.91/01-gpgme.patch \
Added: trunk/patches/gnupg2-2.0.17/01-scd-reader-removal.patch
===================================================================
--- trunk/patches/gnupg2-2.0.17/01-scd-reader-removal.patch 2011-01-24 17:00:15 UTC (rev 1621)
+++ trunk/patches/gnupg2-2.0.17/01-scd-reader-removal.patch 2011-01-26 07:57:38 UTC (rev 1622)
@@ -0,0 +1,49 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+2011-01-25 NIIBE Yutaka <gniibe at fsij.org>,
+ Grant Olson <kgo at grant-olson.net> (wk)
+
+ * command.c (do_reset, get_reader_slot)
+ (update_reader_status_file): Fix handling of the VALID flag for
+ unplugged readers.
+
+diff --git a/scd/command.c b/scd/command.c
+index e2cd1f5..28bc4df 100644
+--- a/scd/command.c
++++ b/scd/command.c
+@@ -309,7 +309,7 @@ do_reset (ctrl_t ctrl, int send_reset)
+ {
+ if (apdu_reset (slot))
+ {
+- slot_table[slot].reset_failed = 1;
++ slot_table[slot].valid = 0;
+ }
+ application_notify_card_reset (slot);
+ }
+@@ -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;
+ }
+
Property changes on: trunk/patches/gnupg2-2.0.17/01-scd-reader-removal.patch
___________________________________________________________________
Name: svn:executable
+ *
More information about the Gpg4win-commits
mailing list