summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-23 17:08:13 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-23 17:08:13 +0200
commit4cc7f662087f3d2470ba4454c6f48a20c6c16070 (patch)
tree8a83810d6fbaf9b9492428ea04b1f804f2d48a9f /runtime/msg.c
parent668b54063cdafd5fa8c017ae8eb1136d407a9bbf (diff)
downloadrsyslog-4cc7f662087f3d2470ba4454c6f48a20c6c16070.tar.gz
rsyslog-4cc7f662087f3d2470ba4454c6f48a20c6c16070.tar.bz2
rsyslog-4cc7f662087f3d2470ba4454c6f48a20c6c16070.zip
enable error message for invalid property names
also add some support for global vars back, as the syntax may not go away.
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c7
1 files 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;