summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-08 09:13:39 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-08 09:13:39 +0200
commitd9ea755214ab75afa039a4df89f828d4b8b30ef0 (patch)
tree38a342665c206fef93ba230567c9f0f8051feaea /runtime
parent834fe024b4e53f65d9622a176116f232e212e326 (diff)
downloadrsyslog-d9ea755214ab75afa039a4df89f828d4b8b30ef0.tar.gz
rsyslog-d9ea755214ab75afa039a4df89f828d4b8b30ef0.tar.xz
rsyslog-d9ea755214ab75afa039a4df89f828d4b8b30ef0.zip
milestone/[PARTWORK]: implemented comparison operations
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Makefile.am20
-rw-r--r--runtime/rsconf.c3
-rw-r--r--runtime/rsyslog.c4
-rw-r--r--runtime/rule.c11
4 files changed, 14 insertions, 24 deletions
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index 7c3d18ef..c6c860ea 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -5,6 +5,16 @@ pkglib_LTLIBRARIES =
#pkglib_LTLIBRARIES = librsyslog.la
librsyslog_la_SOURCES = \
+ expr.c \
+ expr.h \
+ vm.c \
+ vm.h \
+ vmstk.c \
+ vmstk.h \
+ vmprg.c \
+ vmprg.h \
+ vmop.c \
+ vmop.h \
rsyslog.c \
rsyslog.h \
typedefs.h \
@@ -55,8 +65,6 @@ librsyslog_la_SOURCES = \
statsobj.h \
sync.c \
sync.h \
- expr.c \
- expr.h \
ctok.c \
ctok.h \
ctok_token.c \
@@ -71,14 +79,6 @@ librsyslog_la_SOURCES = \
wti.h \
sysvar.c \
sysvar.h \
- vm.c \
- vm.h \
- vmstk.c \
- vmstk.h \
- vmprg.c \
- vmprg.h \
- vmop.c \
- vmop.h \
queue.c \
queue.h \
ruleset.c \
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index 0d3c940a..c1bc3b72 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -1152,11 +1152,8 @@ ourConf = loadConf; // TODO: remove, once ourConf is gone!
CHKiRet(initLegacyConf());
/* open the configuration file */
- dbgprintf("ZZZZZ: calling cnfSetLexFile(%s)\n", confFile);
r = cnfSetLexFile((char*)confFile);
- dbgprintf("ZZZZZ: cnfSetLexFile returns %d, calling yyparse()\n", r);
r = yyparse();
- dbgprintf("ZZZZZ: yyparse returns %d\n", r);
//localRet = conf.processConfFile(loadConf, confFile);
CHKiRet(conf.GetNbrActActions(loadConf, &iNbrActions));
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c
index 2b8f2b64..d71fe88a 100644
--- a/runtime/rsyslog.c
+++ b/runtime/rsyslog.c
@@ -182,10 +182,13 @@ rsrtInit(char **ppErrObj, obj_if_t *pObjIF)
CHKiRet(ctok_tokenClassInit(NULL));
if(ppErrObj != NULL) *ppErrObj = "ctok";
CHKiRet(ctokClassInit(NULL));
+#if 1
if(ppErrObj != NULL) *ppErrObj = "vmstk";
CHKiRet(vmstkClassInit(NULL));
+#endif
if(ppErrObj != NULL) *ppErrObj = "sysvar";
CHKiRet(sysvarClassInit(NULL));
+#if 1
if(ppErrObj != NULL) *ppErrObj = "vm";
CHKiRet(vmClassInit(NULL));
if(ppErrObj != NULL) *ppErrObj = "vmop";
@@ -194,6 +197,7 @@ rsrtInit(char **ppErrObj, obj_if_t *pObjIF)
CHKiRet(vmprgClassInit(NULL));
if(ppErrObj != NULL) *ppErrObj = "expr";
CHKiRet(exprClassInit(NULL));
+#endif
if(ppErrObj != NULL) *ppErrObj = "rule";
CHKiRet(ruleClassInit(NULL));
if(ppErrObj != NULL) *ppErrObj = "ruleset";
diff --git a/runtime/rule.c b/runtime/rule.c
index 67ef8650..0b4b48a2 100644
--- a/runtime/rule.c
+++ b/runtime/rule.c
@@ -36,7 +36,6 @@
#include "action.h"
#include "rule.h"
#include "errmsg.h"
-#include "vm.h"
#include "var.h"
#include "srUtils.h"
#include "batch.h"
@@ -46,9 +45,7 @@
/* static data */
DEFobjStaticHelpers
DEFobjCurrIf(errmsg)
-DEFobjCurrIf(expr)
DEFobjCurrIf(var)
-DEFobjCurrIf(vm)
/* support for simple textual representation of FIOP names
@@ -124,7 +121,6 @@ shouldProcessThisMessage(rule_t *pRule, msg_t *pMsg, sbool *bProcessMsg)
uchar *pszPropVal;
int bRet = 0;
size_t propLen;
- vm_t *pVM = NULL;
var_t *pResult = NULL;
ISOBJ_TYPE_assert(pRule, rule);
@@ -276,9 +272,6 @@ shouldProcessThisMessage(rule_t *pRule, msg_t *pMsg, sbool *bProcessMsg)
finalize_it:
/* destruct in any case, not just on error, but it makes error handling much easier */
- if(pVM != NULL)
- vm.Destruct(&pVM);
-
if(pResult != NULL)
var.Destruct(&pResult);
@@ -482,9 +475,7 @@ ENDobjQueryInterface(rule)
*/
BEGINObjClassExit(rule, OBJ_IS_CORE_MODULE) /* class, version */
objRelease(errmsg, CORE_COMPONENT);
- objRelease(expr, CORE_COMPONENT);
objRelease(var, CORE_COMPONENT);
- objRelease(vm, CORE_COMPONENT);
ENDObjClassExit(rule)
@@ -495,9 +486,7 @@ ENDObjClassExit(rule)
BEGINObjClassInit(rule, 1, OBJ_IS_CORE_MODULE) /* class, version */
/* request objects we use */
CHKiRet(objUse(errmsg, CORE_COMPONENT));
- CHKiRet(objUse(expr, CORE_COMPONENT));
CHKiRet(objUse(var, CORE_COMPONENT));
- CHKiRet(objUse(vm, CORE_COMPONENT));
/* set our own handlers */
OBJSetMethodHandler(objMethod_DEBUGPRINT, ruleDebugPrint);