Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
am bf10797: am f7ca604: Fix infinite loop in init when debugging is t…
Browse files Browse the repository at this point in the history
…urned off

* commit 'bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0':
  Fix infinite loop in init when debugging is turned off
  • Loading branch information
colincross authored and Android Git Automerger committed Jan 5, 2011
2 parents 512405a + bf10797 commit 8bc6fb3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions init/keychords.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ void handle_keychord()
// and on user builds for users that are developers.
debuggable = property_get("ro.debuggable");
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")) ||
(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);
if (svc) {
INFO("starting service %s from keychord\n", svc->name);
Expand Down

0 comments on commit 8bc6fb3

Please sign in to comment.