Reverted some silly changes
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void get_test_device(libusb_context *usb_ctx, struct libusb_device_bundle *bundle)
|
||||
int get_test_device(libusb_context *usb_ctx, struct libusb_device_bundle *bundle)
|
||||
{
|
||||
libusb_device **usb_device_list = NULL;
|
||||
int usb_dev_count;
|
||||
int usb_dev_count, ret = 1;
|
||||
|
||||
usb_dev_count = libusb_get_device_list(usb_ctx, &usb_device_list);
|
||||
|
||||
@@ -23,15 +23,20 @@ void get_test_device(libusb_context *usb_ctx, struct libusb_device_bundle *bundl
|
||||
|
||||
if(usb_desc.idVendor == 0x05AC && usb_desc.idProduct == 0x1227)
|
||||
{
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(usb_device_list, usb_dev_count);
|
||||
bundle->ctx = usb_ctx;
|
||||
bundle->device = usb_device;
|
||||
bundle->handle = usb_handle;
|
||||
bundle->descriptor = usb_desc;
|
||||
if(ret == 0)
|
||||
{
|
||||
bundle->device = usb_device;
|
||||
bundle->handle = usb_handle;
|
||||
bundle->descriptor = usb_desc;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void LIBUSB_CALL async_ctrl_transfer_cb(struct libusb_transfer *transfer)
|
||||
|
||||
Reference in New Issue
Block a user