summaryrefslogtreecommitdiffstats
path: root/runtime/rsconf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-07 08:22:40 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-07 08:22:40 +0200
commit5710b413963d2fde9d062127ed72672b8a58a07e (patch)
tree35cd364e62273da3a239f1c72f1d50d4e69ce21b /runtime/rsconf.c
parent30f2b5b094d282af6f601aa4e8fa88c1baf187f4 (diff)
downloadrsyslog-5710b413963d2fde9d062127ed72672b8a58a07e.tar.gz
rsyslog-5710b413963d2fde9d062127ed72672b8a58a07e.tar.bz2
rsyslog-5710b413963d2fde9d062127ed72672b8a58a07e.zip
milestone/[PARTWORK]: integrted script filter, but var access is missing
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r--runtime/rsconf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index 17332464..cb8eac50 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -255,7 +255,9 @@ parser_errmsg(char *fmt, ...)
va_list ap;
va_start(ap, fmt);
// TODO: create useful code ;) 2011-07-06
- dbgprintf("error on or before line %d: ", yylineno);
+ errmsg.LogError(0, NO_ERRCODE, "error during parsing on or before line %d",
+ yylineno);
+dbgprintf("error on or before line %d: ", yylineno);
vprintf(fmt, ap);
printf("\n");
va_end(ap);
@@ -284,8 +286,8 @@ void cnfDoRule(struct cnfrule *cnfrule)
cnfrulePrint(cnfrule);
CHKiRet(rule.Construct(&pRule)); /* create "fresh" selector */
- CHKiRet(rule.SetAssRuleset(pRule, ruleset.GetCurrent(loadConf))); /* create "fresh" selector */
- CHKiRet(rule.ConstructFinalize(pRule)); /* create "fresh" selector */
+ CHKiRet(rule.SetAssRuleset(pRule, ruleset.GetCurrent(loadConf)));
+ CHKiRet(rule.ConstructFinalize(pRule));
switch(cnfrule->filttype) {
case CNFFILT_NONE:
@@ -300,23 +302,21 @@ void cnfDoRule(struct cnfrule *cnfrule)
iRet = cflineProcessPropFilter(&str, pRule);
break;
case CNFFILT_SCRIPT:
- dbgprintf("TODO: script filter implementation missing\n");
- cnfexprPrint(cnfrule->filt.expr, 0);
+ pRule->f_filter_type = FILTER_EXPR;
+ pRule->f_filterData.f_expr = cnfrule->filt.expr;
break;
}
/* we now check if there are some global (BSD-style) filter conditions
* and, if so, we copy them over. rgerhards, 2005-10-18
*/
-#if 0 // TODO: add LATER!
if(pDfltProgNameCmp != NULL) {
- CHKiRet(rsCStrConstructFromCStr(&(f->pCSProgNameComp), pDfltProgNameCmp));
+ CHKiRet(rsCStrConstructFromCStr(&(pRule->pCSProgNameComp), pDfltProgNameCmp));
}
if(eDfltHostnameCmpMode != HN_NO_COMP) {
- f->eHostnameCmpMode = eDfltHostnameCmpMode;
- CHKiRet(rsCStrConstructFromCStr(&(f->pCSHostnameComp), pDfltHostnameCmp));
+ pRule->eHostnameCmpMode = eDfltHostnameCmpMode;
+ CHKiRet(rsCStrConstructFromCStr(&(pRule->pCSHostnameComp), pDfltHostnameCmp));
}
-#endif
cnfDoActlst(cnfrule->actlst, pRule);