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

Commit a6597598 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "fix adb {forward,reverse} --no-rebind"

parents fc2f1e61 a6b340af
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -770,12 +770,12 @@ int handle_forward_request(const char* service, TransportType type, const char*
        if (android::base::StartsWith(service, "killforward:")) {
        if (android::base::StartsWith(service, "killforward:")) {
            kill_forward = true;
            kill_forward = true;
            service += 12;
            service += 12;
        } else {
            service += 8;   // skip past "forward:"
            if (android::base::StartsWith(service, "norebind:")) {
            if (android::base::StartsWith(service, "norebind:")) {
                no_rebind = true;
                no_rebind = true;
                service += 9;
                service += 9;
            }
            }
        } else {
            service += 8;
        }
        }


        std::vector<std::string> pieces = android::base::Split(service, ";");
        std::vector<std::string> pieces = android::base::Split(service, ";");
@@ -824,7 +824,7 @@ int handle_forward_request(const char* service, TransportType type, const char*
            message = android::base::StringPrintf("cannot bind to socket: %s", strerror(errno));
            message = android::base::StringPrintf("cannot bind to socket: %s", strerror(errno));
            break;
            break;
          case INSTALL_STATUS_CANNOT_REBIND:
          case INSTALL_STATUS_CANNOT_REBIND:
            message = android::base::StringPrintf("cannot rebind existing socket: %s", strerror(errno));
            message = android::base::StringPrintf("cannot rebind existing socket");
            break;
            break;
          case INSTALL_STATUS_LISTENER_NOT_FOUND:
          case INSTALL_STATUS_LISTENER_NOT_FOUND:
            message = android::base::StringPrintf("listener '%s' not found", service);
            message = android::base::StringPrintf("listener '%s' not found", service);