summaryrefslogtreecommitdiffstats
path: root/plugins/mmnormalize/mmnormalize.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-28 11:43:55 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-28 11:43:55 +0100
commit015999be309c6389b4993c9c046aab5ba06f14e1 (patch)
treed3f59839ad683816017d3922297bcc0cba571815 /plugins/mmnormalize/mmnormalize.c
parent6e906818fc658bf0399e791cca0bbf68fc847164 (diff)
parented3e129c21305799dac17137f03786adb539bc57 (diff)
downloadrsyslog-015999be309c6389b4993c9c046aab5ba06f14e1.tar.gz
rsyslog-015999be309c6389b4993c9c046aab5ba06f14e1.tar.bz2
rsyslog-015999be309c6389b4993c9c046aab5ba06f14e1.zip
Merge branch 'master-lognorm1-noestr'
Diffstat (limited to 'plugins/mmnormalize/mmnormalize.c')
-rw-r--r--plugins/mmnormalize/mmnormalize.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/plugins/mmnormalize/mmnormalize.c b/plugins/mmnormalize/mmnormalize.c
index 613f002d..a8c436fa 100644
--- a/plugins/mmnormalize/mmnormalize.c
+++ b/plugins/mmnormalize/mmnormalize.c
@@ -195,32 +195,25 @@ ENDtryResume
BEGINdoAction
msg_t *pMsg;
- es_str_t *str;
uchar *buf;
int len;
int r;
struct json_object *json = NULL;
CODESTARTdoAction
pMsg = (msg_t*) ppString[0];
- /* note that we can performance-optimize the interface, but this also
- * requires changes to the libraries. For now, we accept message
- * duplication. -- rgerhards, 2010-12-01
- */
if(pWrkrData->pData->bUseRawMsg) {
getRawMsg(pMsg, &buf, &len);
} else {
buf = getMSG(pMsg);
len = getMSGLen(pMsg);
}
- str = es_newStrFromCStr((char*)buf, len);
- r = ln_normalize(pWrkrData->pData->ctxln, str, &json);
+ r = ln_normalize(pWrkrData->pData->ctxln, buf, len, &json);
if(r != 0) {
DBGPRINTF("error %d during ln_normalize\n", r);
MsgSetParseSuccess(pMsg, 0);
} else {
MsgSetParseSuccess(pMsg, 1);
}
- es_deleteStr(str);
msgAddJSON(pMsg, (uchar*)pWrkrData->pData->pszPath + 1, json);