diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-18 13:22:21 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-18 13:22:21 +0200 |
commit | 8628312396b1535c41124e499d292f4d1e77d955 (patch) | |
tree | d294b3fc3f9adc29b3b9137ce2bff55c21fdee81 /plugins/imdiag | |
parent | f529e8b2c3bb2c087bfba3fc5610a66fdbe1a8ae (diff) | |
download | rsyslog-8628312396b1535c41124e499d292f4d1e77d955.tar.gz rsyslog-8628312396b1535c41124e499d292f4d1e77d955.tar.xz rsyslog-8628312396b1535c41124e499d292f4d1e77d955.zip |
cleaned up/optimized raw message handling in msg object
Diffstat (limited to 'plugins/imdiag')
-rw-r--r-- | plugins/imdiag/imdiag.c | 3 |
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; |