summaryrefslogtreecommitdiffstats
path: root/runtime/rsconf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-07 16:35:51 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-07 16:35:51 +0200
commit8a9e0cc68e3314b02065dcd3424201f25f176dfb (patch)
treee354a33f34575afc7eef45981902b8ae8c2fdbb8 /runtime/rsconf.c
parent5710b413963d2fde9d062127ed72672b8a58a07e (diff)
downloadrsyslog-8a9e0cc68e3314b02065dcd3424201f25f176dfb.tar.gz
rsyslog-8a9e0cc68e3314b02065dcd3424201f25f176dfb.tar.bz2
rsyslog-8a9e0cc68e3314b02065dcd3424201f25f176dfb.zip
milestone/[PARTWORK]: obtaining msg vars integrated, "==" works for strings
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r--runtime/rsconf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index cb8eac50..459c9a17 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -222,7 +222,6 @@ cnfDoActlst(struct cnfactlst *actlst, rule_t *pRule)
{
struct cnfcfsyslinelst *cflst;
action_t *pAction;
- rsRetVal localRet;
uchar *str;
DEFiRet;
@@ -280,7 +279,7 @@ void cnfDoRule(struct cnfrule *cnfrule)
{
rule_t *pRule;
uchar *str;
- DEFiRet;
+ rsRetVal iRet = RS_RET_OK; //DEFiRet;
dbgprintf("cnf:global:rule\n");
cnfrulePrint(cnfrule);
@@ -346,6 +345,17 @@ void cnfDoBSDHost(char *ln)
dbgprintf("cnf:global:BSD host: %s\n", ln);
cflineProcessHostSelector((uchar**)&ln);
}
+
+es_str_t*
+cnfGetVar(char *name, void *usrptr)
+{
+ es_str_t *estr;
+ dbgprintf("ZZZZ: var '%s' requested", name);
+ if(name[0] == '$') {
+ estr = msgGetMsgVarNew((msg_t*) usrptr, (uchar*)name+1);
+ }
+ return estr;
+}
/*------------------------------ end interface to flex/bison parser ------------------------------*/