From 5494790ece676ca0a07c0a62cb457338ec4cec90 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 2 Feb 2012 16:47:19 +0100 Subject: bugfix: abort during startup when rsyslog.conf v6+ format was used in a certain way --- ChangeLog | 4 ++++ action.c | 4 ++-- tests/Makefile.am | 3 +++ tests/mysql-basic-cnf6.sh | 0 tests/testsuites/mysql-basic-cnf6.conf | 8 ++++---- 5 files changed, 13 insertions(+), 6 deletions(-) mode change 100644 => 100755 tests/mysql-basic-cnf6.sh diff --git a/ChangeLog b/ChangeLog index 9e42b1ff..2a38431b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ --------------------------------------------------------------------------- +Version 6.3.8 [DEVEL] 2012-02-?? +- bugfix: abort during startup when rsyslog.conf v6+ format was used in + a certain way +--------------------------------------------------------------------------- Version 6.3.7 [DEVEL] 2012-02-02 - imported refactored v5.9.6 imklog linux driver, now combined with BSD driver diff --git a/action.c b/action.c index b4b03ea1..0b0f27c3 100644 --- a/action.c +++ b/action.c @@ -1815,10 +1815,11 @@ doSubmitToActionQComplexBatch(action_t *pAction, batch_t *pBatch) * Defaults must have been set appropriately during action construct! * rgerhards, 2011-08-01 */ -rsRetVal +static rsRetVal actionApplyCnfParam(action_t *pAction, struct cnfparamvals *pvals) { int i; + for(i = 0 ; i < pblk.nParams ; ++i) { if(!pvals[i].bUsed) continue; @@ -1847,7 +1848,6 @@ actionApplyCnfParam(action_t *pAction, struct cnfparamvals *pvals) "param '%s'\n", pblk.descr[i].name); } } - cnfparamvalsDestruct(pvals, &pblk); return RS_RET_OK; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 9893afab..50ce2e0b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -82,6 +82,7 @@ endif if ENABLE_MYSQL_TESTS TESTS += \ mysql-basic.sh \ + mysql-basic-cnf6.sh \ mysql-asyn.sh if ENABLE_OMLIBDBI TESTS += \ @@ -457,8 +458,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ libdbi-asyn.sh \ testsuites/libdbi-asyn.conf \ mysql-basic.sh \ + mysql-basic-cnf6.sh \ mysql-basic-vg.sh \ testsuites/mysql-basic.conf \ + testsuites/mysql-basic-cnf6.conf \ mysql-asyn.sh \ mysql-asyn-vg.sh \ testsuites/mysql-asyn.conf \ diff --git a/tests/mysql-basic-cnf6.sh b/tests/mysql-basic-cnf6.sh old mode 100644 new mode 100755 diff --git a/tests/testsuites/mysql-basic-cnf6.conf b/tests/testsuites/mysql-basic-cnf6.conf index bc95dc4f..12bd0b29 100644 --- a/tests/testsuites/mysql-basic-cnf6.conf +++ b/tests/testsuites/mysql-basic-cnf6.conf @@ -1,7 +1,7 @@ $IncludeConfig diag-common.conf $ModLoad ../plugins/ommysql/.libs/ommysql -:msg, contains, "msgnum:" action(type="ommysql" - server="127.0.0.1" - db="Syslog - uid="rsyslog" pwd="testbench") +if $msg contains 'msgnum' then { + action(type="ommysql" server="127.0.0.1" + db="Syslog" uid="rsyslog" pwd="testbench") +} -- cgit v1.2.3