[git] GnuPG - branch, master, updated. gnupg-2.2.7-387-g611faf1

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri Feb 22 12:12:39 CET 2019


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, master has been updated
       via  611faf1579a56925994d53eb08e1290a4b3958cf (commit)
      from  c1000c673814e552923cf1361346d7dfeee55608 (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 611faf1579a56925994d53eb08e1290a4b3958cf
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Feb 22 20:05:09 2019 +0900

    scd: internal driver: Submit SET_INTERFACE control transfer.
    
    * scd/ccid-driver.c (ccid_open_usb_reader): Alway submit SET_INTERFACE
    control transfer.
    
    --
    
    This handling is not mondatory, but it's better to do so, because
    there are card reader with pinpad and token with ack button, which
    support user interaction.
    
    User interaction status should be reset at open time.  The status
    should be reset when the session is closed/stopped.  In practice,
    since cleanup routine in a driver may not be called properly, it's
    good to submit SET_INTERFACE at open time.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index c165f6e..69df173 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -1653,15 +1653,13 @@ ccid_open_usb_reader (const char *spec_reader_name,
       goto leave;
     }
 
-  if (set_no != 0)
+  /* Submit SET_INTERFACE control transfer which can reset the device.  */
+  rc = libusb_set_interface_alt_setting (idev, ifc_no, set_no);
+  if (rc)
     {
-      rc = libusb_set_interface_alt_setting (idev, ifc_no, set_no);
-      if (rc)
-        {
-          DEBUGOUT_1 ("usb_set_interface_alt_setting failed: %d\n", rc);
-          rc = CCID_DRIVER_ERR_CARD_IO_ERROR;
-          goto leave;
-        }
+      DEBUGOUT_1 ("usb_set_interface_alt_setting failed: %d\n", rc);
+      rc = CCID_DRIVER_ERR_CARD_IO_ERROR;
+      goto leave;
     }
 
   rc = ccid_vendor_specific_init (*handle);

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

Summary of changes:
 scd/ccid-driver.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)


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




More information about the Gnupg-commits mailing list