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

Commit f0e0c2e4 authored by David 'Digit' Turner's avatar David 'Digit' Turner
Browse files

adb: Fix 'adb forward --no-rebind'.

Due to a typo, the --no-rebind option never worked (it always failed).
The root of the problem was that the client was sending on the wire
a command like:

  host:forward:norebind::tcp:<port>;tcp:<port>
                       ^^
Instead of:

  host:forward:norebind:tcp:<port>;tcp:<port>
                       ^

Note the erroneous double-column.

The fix is local to the adb client and thus doesn't require a new
version of the server or guest adbd on the device-side.

This also fixes 'adb reverse --no-rebind'.

See https://code.google.com/p/chromium/issues/detail?id=451109

Change-Id: I680fd432b5470072f6a9968ca32a7f90c600ac68
parent 9da414f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1578,7 +1578,7 @@ int adb_commandline(int argc, char **argv)
        {
          if (argc != 3)
            return usage();
          const char* command = no_rebind ? "forward:norebind:" : "forward";
          const char* command = no_rebind ? "forward:norebind" : "forward";
          snprintf(buf, sizeof buf, "%s:%s:%s;%s", host_prefix, command, argv[1], argv[2]);
        }