adb: fix `adb reverse` when adbd has multiple transports.
Plumb the transport that we received the adb reverse request on through
to reverse_service, instead of trying to get a unique transport on
devices that have multiple active transports (e.g. a device with USB
(even unplugged) connected via TCP).
Bug: http://b/37066218
Bug: http://b/71898863
Test: `echo foo | nc -l 12345 & adb reverse tcp:12345 tcp:12345; adb shell nc localhost 12345` on a device connected via TCP
Change-Id: Iae199ae787f2e344126bbcacca8544cfc9844a4c
diff --git a/adb/sockets.cpp b/adb/sockets.cpp
index f3fce27..7bc0165 100644
--- a/adb/sockets.cpp
+++ b/adb/sockets.cpp
@@ -348,7 +348,7 @@
return s;
}
-asocket* create_local_service_socket(const char* name, const atransport* transport) {
+asocket* create_local_service_socket(const char* name, atransport* transport) {
#if !ADB_HOST
if (!strcmp(name, "jdwp")) {
return create_jdwp_service_socket();