From f094fcb2616127b02999e40442895553c6cfd747 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 9 Oct 2009 15:48:32 +0200 Subject: added one more parser test case --- tests/Makefile.am | 1 + tests/testsuites/malformed1.parse1 | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 tests/testsuites/malformed1.parse1 diff --git a/tests/Makefile.am b/tests/Makefile.am index c31e9eaa..cdf2c4be 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -90,6 +90,7 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/rfc5424-2.parse1 \ testsuites/rfc5424-3.parse1 \ testsuites/rfc5424-4.parse1 \ + testsuites/malformed.parse1 \ testsuites/omod-if-array.conf \ testsuites/1.omod-if-array \ testsuites/1.field1 \ diff --git a/tests/testsuites/malformed1.parse1 b/tests/testsuites/malformed1.parse1 new file mode 100644 index 00000000..2d95170d --- /dev/null +++ b/tests/testsuites/malformed1.parse1 @@ -0,0 +1,5 @@ +<131>Oct 8 23:05:06 10.321.1.123 05",result_code=200,b +131,local0,err,Oct 8 23:05:06,10.321.1.123,05",result_code=200,b,05",result_code=200,b +# a somewhat mangeld-with real-life sample of a malformed message +# the key here is not what is being parsed, but that we do not abort! +# NOTE: if a parser enhancement breaks the format, this is probably OK -- cgit v1.2.3 From e6b2cba8038061ab7f1f324110eeabbc8dfe2c30 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 14 Oct 2009 11:16:43 +0200 Subject: bugfix(minor): diag function returned wrong queue memeber count ...for the main queue if an active DA queue existed. This had no relevance to real deployments (assuming they are not running the debug/diagnostic module...), but sometimes caused grief and false alerts in the testbench. --- ChangeLog | 5 +++++ tools/syslogd.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7980d411..d5bf1a28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ --------------------------------------------------------------------------- Version 4.5.6 [v4-beta] (rgerhards), 2009-09-?? +- bugfix(minor): diag function returned wrong queue memeber count + for the main queue if an active DA queue existed. This had no relevance + to real deployments (assuming they are not running the debug/diagnostic + module...), but sometimes caused grief and false alerts in the + testbench. - included some important fixes from v4-stable: * bugfix: invalid handling of zero-sized messages * bugfix: zero-sized UDP messages are no longer processed diff --git a/tools/syslogd.c b/tools/syslogd.c index 45c30baa..fb3294d5 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -411,7 +411,8 @@ diagGetMainMsgQSize(int *piSize) { DEFiRet; assert(piSize != NULL); - *piSize = pMsgQueue->iQueueSize; + *piSize = (pMsgQueue->pqDA != NULL) ? pMsgQueue->pqDA->iQueueSize : 0; + *piSize += pMsgQueue->iQueueSize; RETiRet; } -- cgit v1.2.3