adb: Fix adb tcpip command
When running "adb tcpip 5555", adb create a service socket named "tcpip:5555". Only compare the 6 first chars "tcpip:" to decide if we enable exit_on_close. Bug: 6650130 Change-Id: I0835973de044f1cfde0e859ff0277c0ccc2630a3
This commit is contained in:
parent
0f3974c3d0
commit
aeceb51745
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
D("LS(%d): bound to '%s' via %d\n", s->id, name, fd);
|
||||||
|
|
||||||
#if !ADB_HOST
|
#if !ADB_HOST
|
||||||
if ((!strcmp(name, "root:") && getuid() != 0)
|
if ((!strncmp(name, "root:", 5) && getuid() != 0)
|
||||||
|| !strcmp(name, "usb:")
|
|| !strncmp(name, "usb:", 4)
|
||||||
|| !strcmp(name, "tcpip:")) {
|
|| !strncmp(name, "tcpip:", 6)) {
|
||||||
D("LS(%d): enabling exit_on_close\n", s->id);
|
D("LS(%d): enabling exit_on_close\n", s->id);
|
||||||
s->exit_on_close = 1;
|
s->exit_on_close = 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue