summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2012-06-12 16:44:11 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-12 16:44:11 -0700
commit504dccec97c12283f348838ba0bf88536322ee6b (patch)
tree1bc6c1c061163d216f1ae6fc4e7218dbfe062064
parent1e96e16f81ce46adf5329b1db4662b53b927d4e2 (diff)
parentaeceb5174502659cb4fff6de924b54ef7e6cdae7 (diff)
downloadsystem_core-504dccec97c12283f348838ba0bf88536322ee6b.zip
system_core-504dccec97c12283f348838ba0bf88536322ee6b.tar.gz
system_core-504dccec97c12283f348838ba0bf88536322ee6b.tar.bz2
am aeceb517: adb: Fix adb tcpip command
* commit 'aeceb5174502659cb4fff6de924b54ef7e6cdae7': adb: Fix adb tcpip command
-rw-r--r--adb/sockets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/sockets.c b/adb/sockets.c
index 91db951..cd31b23 100644
--- a/adb/sockets.c
+++ b/adb/sockets.c
@@ -427,9 +427,9 @@ asocket *create_local_service_socket(const char *name)
D("LS(%d): bound to '%s' via %d\n", s->id, name, fd);
#if !ADB_HOST
- if ((!strcmp(name, "root:") && getuid() != 0)
- || !strcmp(name, "usb:")
- || !strcmp(name, "tcpip:")) {
+ if ((!strncmp(name, "root:", 5) && getuid() != 0)
+ || !strncmp(name, "usb:", 4)
+ || !strncmp(name, "tcpip:", 6)) {
D("LS(%d): enabling exit_on_close\n", s->id);
s->exit_on_close = 1;
}