summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2013-09-24 16:13:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-24 16:13:17 -0700
commit0b7d588d531691904530ba57d772b31fb24ed343 (patch)
treef739aade90417da4c77c12667f11f569f86a6985 /init
parent20eb7ac26435abb1b2514951eee07fee44773877 (diff)
parentf2c4c4ada725b86e6581a89cc06e2836d4bdc6e3 (diff)
downloadsystem_core-0b7d588d531691904530ba57d772b31fb24ed343.zip
system_core-0b7d588d531691904530ba57d772b31fb24ed343.tar.gz
system_core-0b7d588d531691904530ba57d772b31fb24ed343.tar.bz2
am f2c4c4ad: Merge "init: Fix queue_all_property_triggers with nonexistent properties"
* commit 'f2c4c4ada725b86e6581a89cc06e2836d4bdc6e3': init: Fix queue_all_property_triggers with nonexistent properties
Diffstat (limited to 'init')
-rw-r--r--init/init_parser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/init/init_parser.c b/init/init_parser.c
index 616671a..2c2c91c 100644
--- a/init/init_parser.c
+++ b/init/init_parser.c
@@ -549,12 +549,14 @@ void queue_all_property_triggers()
if (length > PROP_NAME_MAX) {
ERROR("property name too long in trigger %s", act->name);
} else {
+ int ret;
memcpy(prop_name, name, length);
prop_name[length] = 0;
/* does the property exist, and match the trigger value? */
- property_get(prop_name, value);
- if (!strcmp(equals + 1, value) ||!strcmp(equals + 1, "*")) {
+ ret = property_get(prop_name, value);
+ if (ret > 0 && (!strcmp(equals + 1, value) ||
+ !strcmp(equals + 1, "*"))) {
action_add_queue_tail(act);
}
}