summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/libirecovery.h2
-rw-r--r--src/libirecovery.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h
index f4e62c7..daf1761 100644
--- a/include/libirecovery.h
+++ b/include/libirecovery.h
@@ -100,7 +100,7 @@ irecv_error_t irecv_trigger_limera1n_exploit(irecv_client_t client);
/* usb helpers */
irecv_error_t irecv_usb_set_configuration(irecv_client_t client, int configuration);
-irecv_error_t irecv_usb_set_interface(irecv_client_t client, int interface, int alt_interface);
+irecv_error_t irecv_usb_set_interface(irecv_client_t client, int usb_interface, int usb_alt_interface);
int irecv_usb_control_transfer(irecv_client_t client, uint8_t bm_request_type, uint8_t b_request, uint16_t w_value, uint16_t w_index, unsigned char *data, uint16_t w_length, unsigned int timeout);
int irecv_usb_bulk_transfer(irecv_client_t client, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout);
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 8b4864c..f8292d1 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -721,26 +721,26 @@ irecv_error_t irecv_usb_set_configuration(irecv_client_t client, int configurati
return IRECV_E_SUCCESS;
}
-irecv_error_t irecv_usb_set_interface(irecv_client_t client, int interface, int alt_interface) {
+irecv_error_t irecv_usb_set_interface(irecv_client_t client, int usb_interface, int usb_alt_interface) {
if (check_context(client) != IRECV_E_SUCCESS)
return IRECV_E_NO_DEVICE;
- debug("Setting to interface %d:%d\n", interface, alt_interface);
+ debug("Setting to interface %d:%d\n", usb_interface, usb_alt_interface);
#ifndef WIN32
- if (libusb_claim_interface(client->handle, interface) < 0) {
+ if (libusb_claim_interface(client->handle, usb_interface) < 0) {
return IRECV_E_USB_INTERFACE;
}
- if (libusb_set_interface_alt_setting(client->handle, interface, alt_interface) < 0) {
+ if (libusb_set_interface_alt_setting(client->handle, usb_interface, usb_alt_interface) < 0) {
return IRECV_E_USB_INTERFACE;
}
#else
- if (irecv_usb_control_transfer(client, 0, 0x0B, alt_interface, interface, NULL, 0, USB_TIMEOUT) < 0) {
+ if (irecv_usb_control_transfer(client, 0, 0x0B, usb_alt_interface, usb_interface, NULL, 0, USB_TIMEOUT) < 0) {
return IRECV_E_USB_INTERFACE;
}
#endif
- client->interface = interface;
- client->alt_interface = alt_interface;
+ client->interface = usb_interface;
+ client->alt_interface = usb_alt_interface;
return IRECV_E_SUCCESS;
}