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
This commit is contained in:
Omari Stephens 2011-05-09 18:45:06 -07:00
parent 0ab886bdab
commit 8bbae23915
2 changed files with 3 additions and 1 deletions

View file

@ -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;

View file

@ -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) {