summaryrefslogtreecommitdiffstats
path: root/runtime/rsconf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-04-19 12:18:26 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-04-19 12:18:26 +0200
commitb722cd3fe608a0bbf4a6df962f9d5c5e547fdc09 (patch)
treee47f14e73a38e4f8cb835b5099f11d0cc848152b /runtime/rsconf.c
parentd348558a51402d08310d95cfd6e8a2d6b9fce1b2 (diff)
downloadrsyslog-b722cd3fe608a0bbf4a6df962f9d5c5e547fdc09.tar.gz
rsyslog-b722cd3fe608a0bbf4a6df962f9d5c5e547fdc09.tar.xz
rsyslog-b722cd3fe608a0bbf4a6df962f9d5c5e547fdc09.zip
milestone: ruleset now supports rsconf_t
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r--runtime/rsconf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index be780251..27d89fb6 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -27,10 +27,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <string.h>
#include "rsyslog.h"
#include "obj.h"
#include "srUtils.h"
+#include "ruleset.h"
#include "rsconf.h"
/* static data */
@@ -40,6 +42,12 @@ DEFobjStaticHelpers
/* Standard-Constructor
*/
BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macro! */
+ pThis->templates.root = NULL;
+ pThis->templates.last = NULL;
+ pThis->templates.lastStatic = NULL;
+ pThis->actions.nbrActions = 0;
+ CHKiRet(llInit(&pThis->rulesets.llRulesets, rulesetDestructForLinkedList, rulesetKeyDestruct, strcasecmp));
+finalize_it:
ENDobjConstruct(rsconf)
@@ -57,9 +65,7 @@ rsRetVal rsconfConstructFinalize(rsconf_t __attribute__((unused)) *pThis)
/* destructor for the rsconf object */
BEGINobjDestruct(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(rsconf)
- pThis->templates.root = NULL;
- pThis->templates.last = NULL;
- pThis->templates.lastStatic = NULL;
+ llDestroy(&(pThis->rulesets.llRulesets));
ENDobjDestruct(rsconf)