summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-08-11 15:29:58 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-08-11 15:29:58 +0200
commit018726ff3e3c842af5afc9da642c7d2fb058b633 (patch)
treec79c0ba907e2c4aa5dcfe0e1debaa9fc5d69a914
parentd89c2e2062117b49f18688531ac93b7ac0307042 (diff)
parent9d54647def152dee5f7be6e265dfb54c13b3541d (diff)
downloadrsyslog-018726ff3e3c842af5afc9da642c7d2fb058b633.tar.gz
rsyslog-018726ff3e3c842af5afc9da642c7d2fb058b633.tar.xz
rsyslog-018726ff3e3c842af5afc9da642c7d2fb058b633.zip
Merge branch 'v5-devel'
-rw-r--r--plugins/pmrfc3164sd/pmrfc3164sd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/pmrfc3164sd/pmrfc3164sd.c b/plugins/pmrfc3164sd/pmrfc3164sd.c
index 41a9252d..5598c025 100644
--- a/plugins/pmrfc3164sd/pmrfc3164sd.c
+++ b/plugins/pmrfc3164sd/pmrfc3164sd.c
@@ -1,4 +1,4 @@
-/* pmrfc3164.c
+/* pmrfc3164sd.c
* This is a parser module for RFC3164(legacy syslog)-formatted messages.
*
* NOTE: read comments in module-template.h to understand how this file
@@ -45,7 +45,7 @@
#include "unicode-helper.h"
MODULE_TYPE_PARSER
-PARSER_NAME("contributed.rfc3164sd")
+PARSER_NAME("contrib.rfc3164sd")
/* internal structures
*/
@@ -293,8 +293,10 @@ CODESTARTparse
CHKmalloc(pBuf = MALLOC(sizeof(uchar) * (lenMsg + 1)));
/* STRUCTURED-DATA */
- parseRFCStructuredData(&p2parse, pBuf, &lenMsg);
- MsgSetStructuredData(pMsg, (char*)pBuf);
+ if (parseRFCStructuredData(&p2parse, pBuf, &lenMsg) == 0)
+ MsgSetStructuredData(pMsg, (char*)pBuf);
+ else
+ MsgSetStructuredData(pMsg, "-");
/* The rest is the actual MSG */
MsgSetMSGoffs(pMsg, p2parse - pMsg->pszRawMsg);