diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-04 16:44:41 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-04 16:44:41 +0000 |
commit | 3b8457d1da7f81f9d5c48ff9f1d84cb838942803 (patch) | |
tree | 457fc601c430a59d25c4a7466a2ebfdc1bdb5b14 /syslogd.c | |
parent | eb9f97ee2d34f00ca823ebead26e133e4b9a8495 (diff) | |
download | rsyslog-3b8457d1da7f81f9d5c48ff9f1d84cb838942803.tar.gz rsyslog-3b8457d1da7f81f9d5c48ff9f1d84cb838942803.tar.xz rsyslog-3b8457d1da7f81f9d5c48ff9f1d84cb838942803.zip |
utilized the new auto-destruction capability so that the queue can now
destruct user objects if needed
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1858,6 +1858,7 @@ static void processMsg(msg_t *pMsg) * NOTE: Having more than one worker requires guarding of some * message object structures and potentially others - need to be checked * before we support multiple worker threads on the message queue. + * Please note: the message object is destructed by the queue itself! */ static rsRetVal msgConsumer(void *pUsr) @@ -1867,7 +1868,6 @@ msgConsumer(void *pUsr) assert(pMsg != NULL); processMsg(pMsg); - MsgDestruct(pMsg); return RS_RET_OK; } @@ -2338,10 +2338,13 @@ logmsg(int pri, msg_t *pMsg, int flags) */ pMsg->msgFlags = flags; + queueEnqObj(pMsgQueue, (void*) pMsg); +#if 0 CHKiRet_Hdlr(queueEnqObj(pMsgQueue, (void*) pMsg)) { /* if we have an error return, the pMsg was not destructed */ MsgDestruct(pMsg); } +#endif } |