Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3346339f authored by Josh Gao's avatar Josh Gao
Browse files

adb: fix transport acquisition for forward, reverse.

Previously, we were calling acquire_one_transport with all empty
parameters, which would work when only one device is connected, but fail
when there are multiple. We've already acquired a transport and put it
into the socket as part of the forward request, so just use that
directly.

Bug: http://b/136198949
Test: test_device.py with multiple devices connected
Change-Id: I4d6bda45b36b71e418ecd9ead61b7379e68aa19b
parent da9c7678
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1243,11 +1243,7 @@ HostRequestResult handle_host_request(std::string_view service, TransportType ty
    // TODO: Switch handle_forward_request to string_view.
    std::string service_str(service);
    if (handle_forward_request(
                service_str.c_str(),
                [=](std::string* error) {
                    return acquire_one_transport(type, serial, transport_id, nullptr, error);
                },
                reply_fd)) {
                service_str.c_str(), [=](std::string* error) { return s->transport; }, reply_fd)) {
        return HostRequestResult::Handled;
    }