From 78f133d7d46386a2215cd45836354260265ade26 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Thu, 19 Apr 2018 13:06:42 -0700 Subject: [PATCH] adb: don't error in handle_host_request if we can't acquire a transport. Host services are attempted after handle_host_request, which means that failing to find a transport to give to handle_forward_request shouldn't send an error over to the other end. Bug: http://b/78294734 Test: `adb track-devices` with multiple devices connected Change-Id: I46c89cc1894b51d48fea7d4e629b1d57f73e3fd6 --- adb/adb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/adb.cpp b/adb/adb.cpp index 4fbfafb70..38c11b9ac 100644 --- a/adb/adb.cpp +++ b/adb/adb.cpp @@ -1221,7 +1221,7 @@ int handle_host_request(const char* service, TransportType type, const char* ser std::string error; atransport* t = acquire_one_transport(type, serial, transport_id, nullptr, &error); if (!t) { - return SendFail(reply_fd, error); + return -1; } int ret = handle_forward_request(service, t, reply_fd);