diff options
| author | Colin Cross <ccross@android.com> | 2011-01-04 18:49:07 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-04 18:49:07 -0800 |
| commit | bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0 (patch) | |
| tree | 3d05aff9b916f609f0ca2f71741ac999a2c6af7f | |
| parent | f1c2a7352f19cf729f91bf2559fc93ef12c74dca (diff) | |
| parent | f7ca6040616f672a6f0039d55e39c610b7c1cf91 (diff) | |
| download | system_core-bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0.tar.gz system_core-bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0.tar.bz2 system_core-bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0.zip | |
am f7ca6040: Fix infinite loop in init when debugging is turned off
* commit 'f7ca6040616f672a6f0039d55e39c610b7c1cf91':
Fix infinite loop in init when debugging is turned off
| -rw-r--r-- | init/keychords.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/init/keychords.c b/init/keychords.c index 53ab3911..febb62fa 100644 --- a/init/keychords.c +++ b/init/keychords.c @@ -103,14 +103,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); |
