[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-11-g1e27c0e

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri Mar 9 00:59:43 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-2-2 has been updated
       via  1e27c0e04cd3280d498dc8b72d2e410f6287f656 (commit)
      from  f8b8b6aac2ca1cb34d7a346aee1d874e7650557b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1e27c0e04cd3280d498dc8b72d2e410f6287f656
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Mar 9 08:56:50 2018 +0900

    scd: More fix with PC/SC for Windows.
    
    * scd/apdu.c (pcsc_get_status): Return status based on CURRENT_STATUS.
    Add debug log.
    
    --
    
    GnuPG-bug-id: 3825
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/scd/apdu.c b/scd/apdu.c
index 6758e69..e797c09 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -667,27 +667,29 @@ pcsc_get_status (int slot, unsigned int *status, int on_wire)
       return pcsc_error_to_sw (err);
     }
 
-  reader_table[slot].pcsc.current_state =
-    (rdrstates[0].event_state & ~PCSC_STATE_CHANGED);
-
-  /*   log_debug  */
-  /*     ("pcsc_get_status_change: %s%s%s%s%s%s%s%s%s%s\n", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_IGNORE)? " ignore":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_CHANGED)? " changed":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_UNKNOWN)? " unknown":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_UNAVAILABLE)?" unavail":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_EMPTY)? " empty":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_PRESENT)? " present":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_ATRMATCH)? " atr":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_EXCLUSIVE)? " excl":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_INUSE)? " unuse":"", */
-  /*      (rdrstates[0].event_state & PCSC_STATE_MUTE)? " mute":"" ); */
+  if ((rdrstates[0].event_state & PCSC_STATE_CHANGED))
+    reader_table[slot].pcsc.current_state =
+      (rdrstates[0].event_state & ~PCSC_STATE_CHANGED);
+
+  if (DBG_CARD_IO)
+    log_debug
+      ("pcsc_get_status_change: %s%s%s%s%s%s%s%s%s%s\n",
+       (rdrstates[0].event_state & PCSC_STATE_IGNORE)? " ignore":"",
+       (rdrstates[0].event_state & PCSC_STATE_CHANGED)? " changed":"",
+       (rdrstates[0].event_state & PCSC_STATE_UNKNOWN)? " unknown":"",
+       (rdrstates[0].event_state & PCSC_STATE_UNAVAILABLE)?" unavail":"",
+       (rdrstates[0].event_state & PCSC_STATE_EMPTY)? " empty":"",
+       (rdrstates[0].event_state & PCSC_STATE_PRESENT)? " present":"",
+       (rdrstates[0].event_state & PCSC_STATE_ATRMATCH)? " atr":"",
+       (rdrstates[0].event_state & PCSC_STATE_EXCLUSIVE)? " excl":"",
+       (rdrstates[0].event_state & PCSC_STATE_INUSE)? " unuse":"",
+       (rdrstates[0].event_state & PCSC_STATE_MUTE)? " mute":"" );
 
   *status = 0;
-  if ( (rdrstates[0].event_state & PCSC_STATE_PRESENT) )
+  if ( (reader_table[slot].pcsc.current_state & PCSC_STATE_PRESENT) )
     {
       *status |= APDU_CARD_PRESENT;
-      if ( !(rdrstates[0].event_state & PCSC_STATE_MUTE) )
+      if ( !(reader_table[slot].pcsc.current_state & PCSC_STATE_MUTE) )
         *status |= APDU_CARD_ACTIVE;
     }
 #ifndef HAVE_W32_SYSTEM
@@ -696,7 +698,7 @@ pcsc_get_status (int slot, unsigned int *status, int on_wire)
      mode.  */
   if ( (*status & (APDU_CARD_PRESENT|APDU_CARD_ACTIVE))
        == (APDU_CARD_PRESENT|APDU_CARD_ACTIVE)
-       && !(rdrstates[0].event_state & PCSC_STATE_INUSE) )
+       && !(reader_table[slot].pcsc.current_state & PCSC_STATE_INUSE) )
     *status |= APDU_CARD_USABLE;
 #else
   /* Some winscard drivers may set EXCLUSIVE and INUSE at the same

-----------------------------------------------------------------------

Summary of changes:
 scd/apdu.c | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list