Fixes hub was not found! error
authorAzureusNation <AzureusNation@users.noreply.github.com>
Fri, 18 Oct 2019 09:44:24 +0000 (10:44 +0100)
committerakallabeth <akallabeth@users.noreply.github.com>
Wed, 23 Oct 2019 07:56:23 +0000 (09:56 +0200)
Again as with auto usb detection strtol needs to use base 10 and force to use base 10 else the conversion does not work correctly.

channels/urbdrc/client/libusb/libusb_udevice.c

index 316736e..0b1ab07 100644 (file)
@@ -606,12 +606,12 @@ static int udev_get_hub_handle(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_numb
                        continue;
 
                unsigned long tmp_b, tmp_d;
-               tmp_b = strtoul(udev_device_get_property_value(dev, "BUSNUM"), NULL, 0);
+               tmp_b = strtoul(udev_device_get_property_value(dev, "BUSNUM"), NULL, 10);
 
                if (errno != 0)
                        continue;
 
-               tmp_d = strtoul(udev_device_get_property_value(dev, "DEVNUM"), NULL, 0);
+               tmp_d = strtoul(udev_device_get_property_value(dev, "DEVNUM"), NULL, 10);
 
                if (errno != 0)
                        continue;
@@ -671,8 +671,8 @@ static int udev_get_hub_handle(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_numb
                        if (dev != NULL)
                        {
                                hub_found = 1;
-                               hub_bus = strtoul(udev_device_get_property_value(dev, "BUSNUM"), NULL, 0);
-                               hub_dev = strtoul(udev_device_get_property_value(dev, "DEVNUM"), NULL, 0);
+                               hub_bus = strtoul(udev_device_get_property_value(dev, "BUSNUM"), NULL, 10);
+                               hub_dev = strtoul(udev_device_get_property_value(dev, "DEVNUM"), NULL, 10);
                                WLog_DBG(TAG, "  Hub BUS/DEV: %d %d", hub_bus, hub_dev);
                        }