summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-08-25 19:21:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-08-25 19:21:12 +0200
commit3d56820f130e6c1b674560125e677be3b6a2d8f4 (patch)
tree80056c32bf315bfd7e8b7d47491e655018b715b2 /runtime/msg.c
parent00c4f69c559e5ba036e20a095843a1ca6eba57c8 (diff)
downloadrsyslog-3d56820f130e6c1b674560125e677be3b6a2d8f4.tar.gz
rsyslog-3d56820f130e6c1b674560125e677be3b6a2d8f4.tar.xz
rsyslog-3d56820f130e6c1b674560125e677be3b6a2d8f4.zip
add capability to configure outname for constant (inside template)
also some cleanup
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index da751dba..891907ec 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2515,9 +2515,9 @@ jsonField(struct templateEntry *pTpe, uchar **ppRes, unsigned short *pbMustBeFre
pSrc = *ppRes;
buflen = (*pBufLen == -1) ? ustrlen(pSrc) : *pBufLen;
/* we hope we have only few escapes... */
- dst = es_newStr(buflen+es_strlen(pTpe->data.field.fieldName)+15);
+ dst = es_newStr(buflen+es_strlen(pTpe->fieldName)+15);
es_addChar(&dst, '"');
- es_addStr(&dst, pTpe->data.field.fieldName);
+ es_addStr(&dst, pTpe->fieldName);
es_addBufConstcstr(&dst, "\"=\"");
CHKiRet(jsonAddVal(pSrc, buflen, &dst));
es_addChar(&dst, '"');