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

Commit 8bbae239 authored by Omari Stephens's avatar Omari Stephens
Browse files

Add a 1000msec timeout for adb's USB control packets

Includes a version bump to make it possible to determine if a given
binary has this fix or not.

Bug: 4111855
Change-Id: I86d902a7fa0c4b906264141d2467b7bdddb61801
parent 0ab886bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
#define ADB_VERSION_MAJOR 1         // Used for help/version information
#define ADB_VERSION_MINOR 0         // Used for help/version information

#define ADB_SERVER_VERSION    26    // Increment this when we want to force users to start a new adb server
#define ADB_SERVER_VERSION    27    // Increment this when we want to force users to start a new adb server

typedef struct amessage amessage;
typedef struct apacket apacket;
+2 −0
Original line number Diff line number Diff line
@@ -605,6 +605,7 @@ static void register_device(const char *dev_name,
        ctrl.wIndex = 0;
        ctrl.wLength = sizeof(languages);
        ctrl.data = languages;
        ctrl.timeout = 1000;

        result = ioctl(usb->desc, USBDEVFS_CONTROL, &ctrl);
        if (result > 0)
@@ -620,6 +621,7 @@ static void register_device(const char *dev_name,
            ctrl.wIndex = __le16_to_cpu(languages[i]);
            ctrl.wLength = sizeof(buffer);
            ctrl.data = buffer;
            ctrl.timeout = 1000;

            result = ioctl(usb->desc, USBDEVFS_CONTROL, &ctrl);
            if (result > 0) {