View | Details | Raw Unified | Return to bug 199185 | Differences between
and this patch

Collapse All | Expand All

(-)android-tools-adb.new/files/patch-usb_libusb.c (-2 / +25 lines)
Lines 1-5 Link Here
1
--- usb_libusb.c.orig	2013-08-01 17:14:17.000000000 +0800
1
--- usb_libusb.c.orig	2014-10-22 02:46:49.000000000 +0200
2
+++ usb_libusb.c	2013-08-01 17:14:46.000000000 +0800
2
+++ usb_libusb.c	2015-04-05 21:48:16.000000000 +0200
3
@@ -37,7 +37,7 @@
3
@@ -37,7 +37,7 @@
4
 #define   TRACE_TAG  TRACE_USB
4
 #define   TRACE_TAG  TRACE_USB
5
 #include "adb.h"
5
 #include "adb.h"
Lines 9-11 Link Here
9
 static libusb_context *ctx = NULL;
9
 static libusb_context *ctx = NULL;
10
 
10
 
11
 struct usb_handle
11
 struct usb_handle
12
@@ -522,14 +522,16 @@
13
                     break; /* languagesCount cycle */
14
                 }
15
             }
16
+        } else {
17
+            strncpy(serial, "????????", sizeof(serial));
18
+        }
19
             
20
-            if (register_device(&uh, serial) == 0) {
21
-                D("check_device(): Failed to register device\n");
22
-                goto fail_interface;
23
-            }
24
-            
25
-            libusb_ref_device(dev);
26
+        if (register_device(&uh, serial) == 0) {
27
+            D("check_device(): Failed to register device\n");
28
+            goto fail_interface;
29
         }
30
+        
31
+        libusb_ref_device(dev);
32
     }
33
     
34
     return;

Return to bug 199185