am f2c4c4ad: Merge "init: Fix queue_all_property_triggers with nonexistent properties"
* commit 'f2c4c4ada725b86e6581a89cc06e2836d4bdc6e3': init: Fix queue_all_property_triggers with nonexistent properties
This commit is contained in:
commit
0b7d588d53
1 changed files with 4 additions and 2 deletions
|
|
@ -549,12 +549,14 @@ void queue_all_property_triggers()
|
||||||
if (length > PROP_NAME_MAX) {
|
if (length > PROP_NAME_MAX) {
|
||||||
ERROR("property name too long in trigger %s", act->name);
|
ERROR("property name too long in trigger %s", act->name);
|
||||||
} else {
|
} else {
|
||||||
|
int ret;
|
||||||
memcpy(prop_name, name, length);
|
memcpy(prop_name, name, length);
|
||||||
prop_name[length] = 0;
|
prop_name[length] = 0;
|
||||||
|
|
||||||
/* does the property exist, and match the trigger value? */
|
/* does the property exist, and match the trigger value? */
|
||||||
property_get(prop_name, value);
|
ret = property_get(prop_name, value);
|
||||||
if (!strcmp(equals + 1, value) ||!strcmp(equals + 1, "*")) {
|
if (ret > 0 && (!strcmp(equals + 1, value) ||
|
||||||
|
!strcmp(equals + 1, "*"))) {
|
||||||
action_add_queue_tail(act);
|
action_add_queue_tail(act);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue