am f7ca6040: Fix infinite loop in init when debugging is turned off
* commit 'f7ca6040616f672a6f0039d55e39c610b7c1cf91': Fix infinite loop in init when debugging is turned off
This commit is contained in:
commit
bf10797e53
1 changed files with 6 additions and 6 deletions
|
|
@ -103,14 +103,14 @@ void handle_keychord()
|
||||||
// and on user builds for users that are developers.
|
// and on user builds for users that are developers.
|
||||||
debuggable = property_get("ro.debuggable");
|
debuggable = property_get("ro.debuggable");
|
||||||
adb_enabled = property_get("init.svc.adbd");
|
adb_enabled = property_get("init.svc.adbd");
|
||||||
|
ret = read(keychord_fd, &id, sizeof(id));
|
||||||
|
if (ret != sizeof(id)) {
|
||||||
|
ERROR("could not read keychord id\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((debuggable && !strcmp(debuggable, "1")) ||
|
if ((debuggable && !strcmp(debuggable, "1")) ||
|
||||||
(adb_enabled && !strcmp(adb_enabled, "running"))) {
|
(adb_enabled && !strcmp(adb_enabled, "running"))) {
|
||||||
ret = read(keychord_fd, &id, sizeof(id));
|
|
||||||
if (ret != sizeof(id)) {
|
|
||||||
ERROR("could not read keychord id\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
svc = service_find_by_keychord(id);
|
svc = service_find_by_keychord(id);
|
||||||
if (svc) {
|
if (svc) {
|
||||||
INFO("starting service %s from keychord\n", svc->name);
|
INFO("starting service %s from keychord\n", svc->name);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue