diff options
author | katerina.kubecova <katerina.kubecova@nic.cz> | 2023-09-20 09:50:22 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-09-20 14:03:18 +0200 |
commit | 8cc9d198c7ab906e176a7926484ea85d4f53cab6 (patch) | |
tree | 01859617efc88c6da5042ddd663ce7e1d19ba9fe | |
parent | bb8e28248be0ad1f728433e4884dfe2db3772b30 (diff) |
Filter: Function unset() accepts attributes declared in config
-rw-r--r-- | filter/config.Y | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/filter/config.Y b/filter/config.Y index a87fb0e5..dfabddf7 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -1002,6 +1002,15 @@ cmd: | UNSET '(' dynamic_attr ')' ';' { $$ = f_new_inst(FI_EA_UNSET, $3); } + | UNSET '(' symbol_known ')' ';' { + switch ($3->class) { + case SYM_ATTRIBUTE: + $$ = f_new_inst(FI_EA_UNSET, *$3->attribute); + break; + default: + cf_error("Can't unset symbol %s", $3->name); + } + } | break_command var_list_r ';' { $$ = f_print($2, !!$2, $1); } |