[git] GnuPG - branch, master, updated. gnupg-2.1.17-94-g21c9ebb

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Jan 23 08:14:41 CET 2017


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  21c9ebb908c2ad2e322e7a13e59e5880494c4d67 (commit)
      from  e926f30a1cda75f6334b79c303b5134f0441a3dc (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 21c9ebb908c2ad2e322e7a13e59e5880494c4d67
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Jan 23 16:12:41 2017 +0900

    scd: Fix INTERRUPT transfer.
    
    * scd/ccid-driver.c (find_endpoint): Don't return Bulk endpoint as
    Interrupt endpoint.
    (ccid_poll): Call libusb_interrupt_transfer.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 5e02628..b7f97ed 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -1100,8 +1100,9 @@ find_endpoint (const struct libusb_interface_descriptor *ifcdesc, int mode)
                    == LIBUSB_TRANSFER_TYPE_INTERRUPT)
                && (ep->bEndpointAddress & 0x80))
         return ep->bEndpointAddress;
-      else if (((ep->bmAttributes & LIBUSB_TRANSFER_TYPE_MASK)
-                == LIBUSB_TRANSFER_TYPE_BULK)
+      else if ((mode == 0 || mode == 1)
+               && ((ep->bmAttributes & LIBUSB_TRANSFER_TYPE_MASK)
+                   == LIBUSB_TRANSFER_TYPE_BULK)
                && (ep->bEndpointAddress & 0x80) == want_bulk_in)
         return ep->bEndpointAddress;
     }
@@ -2459,9 +2460,9 @@ ccid_poll (ccid_driver_t handle)
 
   if (handle->idev)
     {
-      rc = libusb_bulk_transfer (handle->idev, handle->ep_intr,
-                                 (char*)msg, sizeof msg, &msglen,
-                                 0 /* ms timeout */ );
+      rc = libusb_interrupt_transfer (handle->idev, handle->ep_intr,
+                                      (char*)msg, sizeof msg, &msglen,
+                                      0 /* ms timeout */ );
       if (rc == LIBUSB_ERROR_TIMEOUT)
         return 0;
     }

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

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


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




More information about the Gnupg-commits mailing list