Skip to content

Commit d9b7d24

Browse files
committed
multiline-options: Allow multi_line_timeout set to a none integer value
The actual implementation. and validations restrict only the value to be higher than the `follow-freq` (ideally multiplication of it). As the `follow-freq` can be much smaller than one second it makes sense to allow this value to be a non-integer value as well. Signed-off-by: Hofi <[email protected]>
1 parent 4bd09cf commit d9b7d24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/affile/affile-grammar.ym

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ source_affile_options
179179
;
180180

181181
source_affile_option
182-
: KW_FOLLOW_FREQ '(' nonnegative_float ')' { file_reader_options_set_follow_freq(last_file_reader_options, (long) ($3 * 1000)); }
183-
| KW_PAD_SIZE '(' nonnegative_integer ')' { last_log_proto_options->pad_size = $3; }
182+
: KW_FOLLOW_FREQ '(' nonnegative_float ')' { file_reader_options_set_follow_freq(last_file_reader_options, (gint) ($3 * 1000)); }
183+
| KW_PAD_SIZE '(' nonnegative_integer ')' { last_log_proto_options->pad_size = $3; }
184184
| multi_line_option
185185
| multi_line_timeout
186186
| file_perm_option
@@ -240,9 +240,9 @@ source_afpipe_option
240240
;
241241

242242
multi_line_timeout
243-
: KW_MULTI_LINE_TIMEOUT '(' nonnegative_integer ')'
243+
: KW_MULTI_LINE_TIMEOUT '(' nonnegative_float ')'
244244
{
245-
file_reader_options_set_multi_line_timeout(last_file_reader_options, ($3 * 1000));
245+
file_reader_options_set_multi_line_timeout(last_file_reader_options, (gint) ($3 * 1000));
246246
}
247247
;
248248

0 commit comments

Comments
 (0)