summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-08-29 16:00:20 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-08-29 16:00:20 +0200
commitd18a93e943b4552890a0e603b9fc7db5a6fd7761 (patch)
treecc52a522acb81040fcc121ba6c82a9aaa6ae34b0 /runtime/msg.c
parenta5e51ced933cb73bd3755bffb81aceceb3f0f953 (diff)
downloadrsyslog-d18a93e943b4552890a0e603b9fc7db5a6fd7761.tar.gz
rsyslog-d18a93e943b4552890a0e603b9fc7db5a6fd7761.tar.bz2
rsyslog-d18a93e943b4552890a0e603b9fc7db5a6fd7761.zip
default outname for $!<property> is now without $! prefix
also some type cleanup and simplification
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 6725203c..187f0c22 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2577,9 +2577,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->fieldName)+15);
+ dst = es_newStr(buflen+pTpe->lenFieldName+15);
es_addChar(&dst, '"');
- es_addStr(&dst, pTpe->fieldName);
+ es_addBuf(&dst, (char*)pTpe->fieldName, pTpe->lenFieldName);
es_addBufConstcstr(&dst, "\":\"");
CHKiRet(jsonAddVal(pSrc, buflen, &dst));
es_addChar(&dst, '"');