summaryrefslogtreecommitdiffstats
path: root/plugins/imdiag/imdiag.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-24 10:52:06 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-24 10:52:06 +0200
commit8eb10a7105dce1dc3ffc44b291de73d82bd04799 (patch)
treee3c70740599127009b6009a2846d8274e67c8900 /plugins/imdiag/imdiag.c
parent675d46f5b59f64e378968baa5e0dec6810090287 (diff)
parentc53ca3a23429e750aeb6ab1c3600ae8ecb3c8ac6 (diff)
downloadrsyslog-8eb10a7105dce1dc3ffc44b291de73d82bd04799.tar.gz
rsyslog-8eb10a7105dce1dc3ffc44b291de73d82bd04799.tar.bz2
rsyslog-8eb10a7105dce1dc3ffc44b291de73d82bd04799.zip
Merge branch 'omfile'
Conflicts: ChangeLog
Diffstat (limited to 'plugins/imdiag/imdiag.c')
-rw-r--r--plugins/imdiag/imdiag.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/imdiag/imdiag.c b/plugins/imdiag/imdiag.c
index 51f319ca..bfb4a2e5 100644
--- a/plugins/imdiag/imdiag.c
+++ b/plugins/imdiag/imdiag.c
@@ -205,8 +205,7 @@ doInjectMsg(int iNum)
datetime.getCurrTime(&stTime, &ttGenTime);
/* we now create our own message object and submit it to the queue */
CHKiRet(msgConstructWithTime(&pMsg, &stTime, ttGenTime));
- CHKmalloc(pMsg->pszRawMsg = ustrdup(szMsg));
- pMsg->iLenRawMsg = ustrlen(szMsg);
+ MsgSetRawMsg(pMsg, (char*) szMsg, ustrlen(szMsg));
MsgSetInputName(pMsg, UCHAR_CONSTANT("imdiag"), sizeof("imdiag")-1);
MsgSetFlowControlType(pMsg, eFLOWCTL_NO_DELAY);
pMsg->msgFlags = NEEDS_PARSING | PARSE_HOSTNAME;