summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-21 17:22:32 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-21 17:22:32 +0200
commit7a15d40a42d6f2b30b70cfee6b5435133ada9ac7 (patch)
treeb5034d0ce2d120600a60f803b7f0233a3c778549 /template.c
parentf4f2a493b05b5d3247994769325598655afe7fe0 (diff)
downloadrsyslog-7a15d40a42d6f2b30b70cfee6b5435133ada9ac7.tar.gz
rsyslog-7a15d40a42d6f2b30b70cfee6b5435133ada9ac7.tar.bz2
rsyslog-7a15d40a42d6f2b30b70cfee6b5435133ada9ac7.zip
refactor: somewhat simplify property-name-to-id mapping
Diffstat (limited to 'template.c')
-rw-r--r--template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/template.c b/template.c
index 92728607..b09a3515 100644
--- a/template.c
+++ b/template.c
@@ -809,7 +809,7 @@ do_Parameter(uchar **pp, struct template *pTpl)
/* got the name */
cstrFinalize(pStrProp);
- if(propNameToID(pStrProp, &pTpe->data.field.propid) != RS_RET_OK) {
+ if(propNameToID(cstrGetSzStrNoNULL(pStrProp), &pTpe->data.field.propid) != RS_RET_OK) {
errmsg.LogError(0, RS_RET_TPL_INVLD_PROP, "template '%s': invalid parameter '%s'",
pTpl->pszName, cstrGetSzStrNoNULL(pStrProp));
cstrDestruct(&pStrProp);
@@ -1604,7 +1604,7 @@ createPropertyTpe(struct template *pTpl, struct cnfobj *o)
/* apply */
CHKmalloc(pTpe = tpeConstruct(pTpl));
pTpe->eEntryType = FIELD;
- CHKiRet(propNameToID(name, &pTpe->data.field.propid));
+ CHKiRet(propNameToID(cstrGetSzStrNoNULL(name), &pTpe->data.field.propid));
if(pTpe->data.field.propid == PROP_CEE) {
/* in CEE case, we need to preserve the actual property name */
pTpe->data.field.propName = ustrdup(cstrGetSzStrNoNULL(name)+1);