From 5f3c37f63715480b7bba04a81f810b5fc40f43bb Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Wed, 15 Apr 2020 11:35:45 +0200 Subject: [PATCH] Rename get_ccid_usb_device_address() in get_ccid_usb_port_number() What we get is the USB port number so use a correct name for the function. --- src/ccid_usb.c | 2 +- src/ccid_usb.h | 2 +- src/ifdhandler.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ccid_usb.c b/src/ccid_usb.c index 518acf7c..4d0e325a 100644 --- a/src/ccid_usb.c +++ b/src/ccid_usb.c @@ -1105,7 +1105,7 @@ EXTERNAL uint8_t get_ccid_usb_bus_number(int reader_index) { return usbDevice[reader_index].bus_number; } -EXTERNAL uint8_t get_ccid_usb_device_address(int reader_index) { +EXTERNAL uint8_t get_ccid_usb_port_number(int reader_index) { return usbDevice[reader_index].port_number; } diff --git a/src/ccid_usb.h b/src/ccid_usb.h index 38246622..708311c1 100644 --- a/src/ccid_usb.h +++ b/src/ccid_usb.h @@ -38,7 +38,7 @@ status_t CloseUSB(unsigned int reader_index); const unsigned char *get_ccid_device_descriptor(const struct libusb_interface *usb_interface); uint8_t get_ccid_usb_bus_number(int reader_index); -uint8_t get_ccid_usb_device_address(int reader_index); +uint8_t get_ccid_usb_port_number(int reader_index); int ControlUSB(int reader_index, int requesttype, int request, int value, unsigned char *bytes, unsigned int size); diff --git a/src/ifdhandler.c b/src/ifdhandler.c index 1d2281ef..db52c96e 100644 --- a/src/ifdhandler.c +++ b/src/ifdhandler.c @@ -618,7 +618,7 @@ EXTERNAL RESPONSECODE IFDHGetCapabilities(DWORD Lun, DWORD Tag, *Length = sizeof(uint32_t); if (Value) { uint32_t bus = get_ccid_usb_bus_number(reader_index); - uint32_t addr = get_ccid_usb_device_address(reader_index); + uint32_t addr = get_ccid_usb_port_number(reader_index); *(uint32_t *)Value = ((uint32_t)0x0020 << 16) | bus << 8 | addr; } }