Skip to content
Browse files

am bf10797: am f7ca604: Fix infinite loop in init when debugging is t…

…urned off

* commit 'bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0':
  Fix infinite loop in init when debugging is turned off
  • Loading branch information...
2 parents 512405a + bf10797 commit 8bc6fb3433c76428d2fffb83be8902052644fca2 @colincross colincross committed with Android Git Automerger Jan 4, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 init/keychords.c
View
12 init/keychords.c
@@ -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);

0 comments on commit 8bc6fb3

Please sign in to comment.
Something went wrong with that request. Please try again.