Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 931bdcc0 authored by Werner Johansson's avatar Werner Johansson Committed by Dima Zavin
Browse files

Set explicit timeout on USB control transfer

This attempts to solve the intermittent issues with serial number
showing up as all question marks when issuing "fastboot devices"
parent eb42170e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -137,6 +137,7 @@ static int filter_usb_device(int fd, char *ptr, int len, int writable,
        ctrl.wIndex = 0;
        ctrl.wIndex = 0;
        ctrl.wLength = sizeof(buffer);
        ctrl.wLength = sizeof(buffer);
        ctrl.data = buffer;
        ctrl.data = buffer;
	ctrl.timeout = 50;


        result = ioctl(fd, USBDEVFS_CONTROL, &ctrl);
        result = ioctl(fd, USBDEVFS_CONTROL, &ctrl);
        if (result > 0) {
        if (result > 0) {