Skip to content

Commit

Permalink
cfg-grammar: fix context for looking up blocks
Browse files Browse the repository at this point in the history
Whenever we have an embedded block in a source/destination/parser/rewrite
block, we did not push the log context while parsing those elements.

This prevented us from using "block log" elements in these contexts.

Fix that up.

Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed Jun 3, 2024
1 parent 422dbfb commit a972114
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/cfg-grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -799,23 +799,23 @@ log_forks
;

log_fork
: KW_LOG optional_string '{' log_content '}'
: KW_LOG optional_string '{' _log_context_push log_content _log_context_pop '}'
{
if ($2)
{
log_expr_node_set_name($4, $2);
log_expr_node_set_name($5, $2);
free($2);
}
$$ = $4;
$$ = $5;
}
| KW_CHANNEL optional_string '{' log_content '}'
| KW_CHANNEL optional_string '{' _log_context_push log_content _log_context_pop '}'
{
if ($2)
{
log_expr_node_set_name($4, $2);
log_expr_node_set_name($5, $2);
free($2);
}
$$ = $4;
$$ = $5;
}
;

Expand Down

0 comments on commit a972114

Please sign in to comment.