From 4cc7f662087f3d2470ba4454c6f48a20c6c16070 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 23 Oct 2013 17:08:13 +0200 Subject: enable error message for invalid property names also add some support for global vars back, as the syntax may not go away. --- runtime/msg.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/msg.c b/runtime/msg.c index 36444bbc..3690a8b4 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -65,6 +65,7 @@ #include "net.h" #include "var.h" #include "rsconf.h" +#include "parserif.h" /* TODO: move the global variable root to the config object - had no time to to it * right now before vacation -- rgerhards, 2013-07-22 @@ -4114,12 +4115,10 @@ msgPropDescrFill(msgPropDescr_t *pProp, uchar *name, int nameLen) int offs; DEFiRet; if(propNameToID(name, &id) != RS_RET_OK) { -#warning enable error messages - //errmsg.LogError(0, RS_RET_TPL_INVLD_PROP, "invalid property '%s'", - //pTpl->pszName, cstrGetSzStrNoNULL(pStrProp)); + parser_errmsg("invalid property '%s'", name); ABORT_FINALIZE(RS_RET_INVLD_PROP); } - if(id == PROP_CEE || id == PROP_LOCAL_VAR) { + if(id == PROP_CEE || id == PROP_LOCAL_VAR || id == PROP_GLOBAL_VAR) { /* in these cases, we need the field name for later processing */ /* normalize name: remove $ if present */ offs = (name[0] == '$') ? 1 : 0; -- cgit v1.2.3