summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2015-01-22 09:07:41 +0100
committerDavid 'Digit' Turner <digit@google.com>2015-01-23 10:02:58 +0100
commitf0e0c2e458580129a02b383f1eccc0984fcc0966 (patch)
tree6272dfa47f0b1955b7d8df7ad356e06fbd136b02
parent9da414f95e06979e60b48380afbf5372c1ef0ef3 (diff)
downloadsystem_core-f0e0c2e458580129a02b383f1eccc0984fcc0966.zip
system_core-f0e0c2e458580129a02b383f1eccc0984fcc0966.tar.gz
system_core-f0e0c2e458580129a02b383f1eccc0984fcc0966.tar.bz2
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
-rw-r--r--adb/commandline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/commandline.c b/adb/commandline.c
index f345787..44541b7 100644
--- a/adb/commandline.c
+++ b/adb/commandline.c
@@ -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]);
}