From 4955a0e5b84d4ba1ff1f6988b2568c0ab3495f60 Mon Sep 17 00:00:00 2001 From: AzureusNation Date: Fri, 18 Oct 2019 10:44:24 +0100 Subject: [PATCH] Fixes hub was not found! error 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/channels/urbdrc/client/libusb/libusb_udevice.c b/channels/urbdrc/client/libusb/libusb_udevice.c index 316736e..0b1ab07 100644 --- a/channels/urbdrc/client/libusb/libusb_udevice.c +++ b/channels/urbdrc/client/libusb/libusb_udevice.c @@ -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); } -- 2.7.4