From: Pete Batard Date: Sun, 26 Aug 2012 23:16:00 +0000 (+0100) Subject: Windows: Suppress unwanted error message on filter driver X-Git-Tag: upstream/1.0.21~595 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17cede5ab0ce2a1b01fe3a747833d0647acb911e;p=platform%2Fupstream%2Flibusb.git Windows: Suppress unwanted error message on filter driver * Interface access error message was unconditional, even if the filter driver was found later on. --- diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index e843bce..d19c732 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -2699,12 +2699,12 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev } if (!WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) { - usbi_err(ctx, "could not access interface %d: %s", iface, windows_error_str(0)); handle_priv->interface_handle[iface].api_handle = INVALID_HANDLE_VALUE; switch(GetLastError()) { case ERROR_BAD_COMMAND: // The device was disconnected + usbi_err(ctx, "could not access interface %d: %s", iface, windows_error_str(0)); return LIBUSB_ERROR_NO_DEVICE; default: // it may be that we're using the libusb0 filter driver. @@ -2734,7 +2734,7 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev } } if (!found_filter) { - usbi_err(ctx, "could not claim interface %d: %s", iface, windows_error_str(0)); + usbi_err(ctx, "could not access interface %d: %s", iface, windows_error_str(0)); return LIBUSB_ERROR_ACCESS; } } diff --git a/libusb/version_nano.h b/libusb/version_nano.h index aa88cb4..b79f240 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10556 +#define LIBUSB_NANO 10557