diff options
| author | 2013-09-30 10:36:56 +0200 | |
|---|---|---|
| committer | 2013-09-30 10:36:56 +0200 | |
| commit | 263a44b3f5b98a9e5b8c8c6ac46c677930238bb3 (patch) | |
| tree | 660cc94605803c00d31e7d3f8121697345c67537 /src | |
| parent | a39d83aca38ad50dc1ccb1756e92d62adf885ca7 (diff) | |
| download | libirecovery-263a44b3f5b98a9e5b8c8c6ac46c677930238bb3.tar.gz libirecovery-263a44b3f5b98a9e5b8c8c6ac46c677930238bb3.tar.bz2 | |
libirecovery: Rename "interface" variable name as it clashes on WIN32
Diffstat (limited to 'src')
| -rw-r--r-- | src/libirecovery.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 | |||
| 721 | return IRECV_E_SUCCESS; | 721 | return IRECV_E_SUCCESS; |
| 722 | } | 722 | } |
| 723 | 723 | ||
| 724 | irecv_error_t irecv_usb_set_interface(irecv_client_t client, int interface, int alt_interface) { | 724 | irecv_error_t irecv_usb_set_interface(irecv_client_t client, int usb_interface, int usb_alt_interface) { |
| 725 | if (check_context(client) != IRECV_E_SUCCESS) | 725 | if (check_context(client) != IRECV_E_SUCCESS) |
| 726 | return IRECV_E_NO_DEVICE; | 726 | return IRECV_E_NO_DEVICE; |
| 727 | 727 | ||
| 728 | debug("Setting to interface %d:%d\n", interface, alt_interface); | 728 | debug("Setting to interface %d:%d\n", usb_interface, usb_alt_interface); |
| 729 | #ifndef WIN32 | 729 | #ifndef WIN32 |
| 730 | if (libusb_claim_interface(client->handle, interface) < 0) { | 730 | if (libusb_claim_interface(client->handle, usb_interface) < 0) { |
| 731 | return IRECV_E_USB_INTERFACE; | 731 | return IRECV_E_USB_INTERFACE; |
| 732 | } | 732 | } |
| 733 | 733 | ||
| 734 | if (libusb_set_interface_alt_setting(client->handle, interface, alt_interface) < 0) { | 734 | if (libusb_set_interface_alt_setting(client->handle, usb_interface, usb_alt_interface) < 0) { |
| 735 | return IRECV_E_USB_INTERFACE; | 735 | return IRECV_E_USB_INTERFACE; |
| 736 | } | 736 | } |
| 737 | #else | 737 | #else |
| 738 | if (irecv_usb_control_transfer(client, 0, 0x0B, alt_interface, interface, NULL, 0, USB_TIMEOUT) < 0) { | 738 | if (irecv_usb_control_transfer(client, 0, 0x0B, usb_alt_interface, usb_interface, NULL, 0, USB_TIMEOUT) < 0) { |
| 739 | return IRECV_E_USB_INTERFACE; | 739 | return IRECV_E_USB_INTERFACE; |
| 740 | } | 740 | } |
| 741 | #endif | 741 | #endif |
| 742 | client->interface = interface; | 742 | client->interface = usb_interface; |
| 743 | client->alt_interface = alt_interface; | 743 | client->alt_interface = usb_alt_interface; |
| 744 | 744 | ||
| 745 | return IRECV_E_SUCCESS; | 745 | return IRECV_E_SUCCESS; |
| 746 | } | 746 | } |
