[PATCH] Re: [syslog-ng] time_sleep()
Roberto Nibali
ratz at drugphish.ch
Wed Apr 26 23:19:24 CEST 2006
ADDENDUM:
> The grammar was missing an entry, the attached patch should fix it.
> Please try and report back if this solves the problem for you.
And my patch was missing the documentation update, which I've obtained
by fraud from the marvellous syslog-ng-2 tree.
> ------------------------------------------------------------------------
>
> --- syslog-ng-1.6.10/src/cfg-grammar.y 2006-03-14 00:34:13.000000000 +0100
> +++ syslog-ng-1.6.10-ratz/src/cfg-grammar.y 2006-04-26 22:58:20.000000000 +0200
> @@ -631,6 +631,7 @@
> | KW_USE_DNS '(' yesno ')' { configuration->use_dns = $3; }
> | KW_TIME_REOPEN '(' NUMBER ')' { configuration->time_reopen = $3; }
> | KW_TIME_REAP '(' NUMBER ')' { configuration->time_reap = $3; }
> + | KW_TIME_SLEEP '(' NUMBER ')' { configuration->time_sleep = $3; }
> | KW_LOG_FIFO_SIZE '(' NUMBER ')' { configuration->log_fifo_size = $3; }
> | KW_GC_BUSY_THRESHOLD '(' NUMBER ')' { configuration->gc_busy_threshold = $3; }
> | KW_GC_IDLE_THRESHOLD '(' NUMBER ')' { configuration->gc_idle_threshold = $3; }
And attached is the better version for Bazsi to apply if he's inclined
to do so. This is about the third time I've chased down a parser-based
bug, so I wonder if using (f)lex/yacc for this really pays off ;)?
Considering my state of mind, I reckon I could be really off the track
with this patch as well ...
Cheers,
Roberto Nibali, ratz
--
echo
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
-------------- next part --------------
diff -ur syslog-ng-1.6.10/doc/sgml/syslog-ng.xml syslog-ng-1.6.10-ratz/doc/sgml/syslog-ng.xml
--- syslog-ng-1.6.10/doc/sgml/syslog-ng.xml 2006-02-23 18:42:54.000000000 +0100
+++ syslog-ng-1.6.10-ratz/doc/sgml/syslog-ng.xml 2006-04-26 23:12:48.000000000 +0200
@@ -1400,6 +1400,12 @@
<entry>60</entry>
</row>
<row>
+ <entry>time_sleep()</entry>
+ <entry>number</entry>
+ <entry>The time to wait in milliseconds between each invocation of the poll iteration.</entry>
+ <entry>0</entry>
+ </row>
+ <row>
<entry>sync()</entry>
<entry>number</entry>
<entry>The number of lines buffered before they are written to file.</entry>
diff -ur syslog-ng-1.6.10/src/cfg-grammar.y syslog-ng-1.6.10-ratz/src/cfg-grammar.y
--- syslog-ng-1.6.10/src/cfg-grammar.y 2006-03-14 00:34:13.000000000 +0100
+++ syslog-ng-1.6.10-ratz/src/cfg-grammar.y 2006-04-26 22:58:20.000000000 +0200
@@ -631,6 +631,7 @@
| KW_USE_DNS '(' yesno ')' { configuration->use_dns = $3; }
| KW_TIME_REOPEN '(' NUMBER ')' { configuration->time_reopen = $3; }
| KW_TIME_REAP '(' NUMBER ')' { configuration->time_reap = $3; }
+ | KW_TIME_SLEEP '(' NUMBER ')' { configuration->time_sleep = $3; }
| KW_LOG_FIFO_SIZE '(' NUMBER ')' { configuration->log_fifo_size = $3; }
| KW_GC_BUSY_THRESHOLD '(' NUMBER ')' { configuration->gc_busy_threshold = $3; }
| KW_GC_IDLE_THRESHOLD '(' NUMBER ')' { configuration->gc_idle_threshold = $3; }
More information about the syslog-ng
mailing list