mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
ucm: evaluate nested If blocks also in True/False blocks
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
2db93e8dff
commit
fd8c40dccb
1 changed files with 10 additions and 0 deletions
|
|
@ -308,6 +308,16 @@ int uc_mgr_evaluate_condition(snd_use_case_mgr_t *uc_mgr,
|
|||
err = if_eval_one(uc_mgr, n, &a);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_config_search(a, "If", &n2);
|
||||
if (err < 0 && err != -ENOENT) {
|
||||
uc_error("If block error (If)");
|
||||
return -EINVAL;
|
||||
} else if (err == 0) {
|
||||
err = uc_mgr_evaluate_condition(uc_mgr, a, n2);
|
||||
if (err < 0)
|
||||
return err;
|
||||
snd_config_delete(n2);
|
||||
}
|
||||
snd_config_for_each(i2, next2, a) {
|
||||
n2 = snd_config_iterator_entry(i2);
|
||||
err = snd_config_remove(n2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue