diff options
author | Josh Gao <jmgao@google.com> | 2018-04-13 12:17:03 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2018-04-13 14:25:28 -0700 |
commit | ebc1c31c1df098e7c24226c065b9992b776c0b0f (patch) | |
tree | 97606e03261beb63728febaaac7634d6a98ad6ab /adb.h | |
parent | caeda2c570d1f33beb9c21f3a2fcd1cf62362c8c (diff) | |
download | adb-ebc1c31c1df098e7c24226c065b9992b776c0b0f.tar.gz |
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
Diffstat (limited to 'adb.h')
-rw-r--r-- | adb.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -127,7 +127,7 @@ atransport* find_emulator_transport_by_adb_port(int adb_port); atransport* find_emulator_transport_by_console_port(int console_port); #endif -int service_to_fd(const char* name, const atransport* transport); +int service_to_fd(const char* name, atransport* transport); #if ADB_HOST asocket* host_service_to_socket(const char* name, const char* serial, TransportId transport_id); #endif @@ -139,8 +139,7 @@ asocket* create_jdwp_tracker_service_socket(); int create_jdwp_connection_fd(int jdwp_pid); #endif -int handle_forward_request(const char* service, TransportType type, const char* serial, - TransportId transport_id, int reply_fd); +int handle_forward_request(const char* service, atransport* transport, int reply_fd); #if !ADB_HOST void framebuffer_service(int fd, void* cookie); |