[PATCH] Extend the parsing of NUMBER and FLOAT type in patterndb
Hi! At the weekend I tried to create patterndb rules to spamassassin message and realised that it fail in to way. First when spamassasin add negative spam score result. This negative number is not recognised. Second issue is when I use bayes. Sometimes bayes give a very small probabaility number (ie 10^-13 as the order of magnitude) In this situation the exponent is appear in the log (ie.: bayes=1.11022302462516e-16) which not handled by patterndb very good either. SZALAY Attila (1): Added two feature into NUMBER and FLOAT parsing src/radix.c | 37 ++++++++++++++++++++++++++++++------- tests/unit/test_radix.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 7 deletions(-)
Neither FLOAT nor NUMBER was able to parse negative values Added the possibility to parse float number with characteristic. Signed-off-by: SZALAY Attila <sasa@balabit.hu> --- src/radix.c | 37 ++++++++++++++++++++++++++++++------- tests/unit/test_radix.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 7 deletions(-)
Hi, Thanks for your contribution. I've integrated your patch into syslog-ng 3.2: commit 65a873dbf1b9fe97f32e8e6704acbd2156b6b355 Author: Balazs Scheidler <bazsi@balabit.hu> Date: Sun Feb 6 07:31:16 2011 +0100 dbparser: added support for further number formats Neither FLOAT nor NUMBER was able to parse negative values. Added the possibility to parse float number with characteristic + mantissa (e.g. 1.5e15). Signed-off-by: SZALAY Attila <sasa@balabit.hu> Signed-off-by: Balazs Scheidler <bazsi@balabit.hu> On Sat, 2011-01-29 at 00:40 +0100, SZALAY Attila wrote:
Neither FLOAT nor NUMBER was able to parse negative values
Added the possibility to parse float number with characteristic.
Signed-off-by: SZALAY Attila <sasa@balabit.hu> --- src/radix.c | 37 ++++++++++++++++++++++++++++++------- tests/unit/test_radix.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 7 deletions(-)
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
-- Bazsi
participants (2)
-
Balazs Scheidler
-
SZALAY Attila