summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-04 16:44:41 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-04 16:44:41 +0000
commit3b8457d1da7f81f9d5c48ff9f1d84cb838942803 (patch)
tree457fc601c430a59d25c4a7466a2ebfdc1bdb5b14 /msg.c
parenteb9f97ee2d34f00ca823ebead26e133e4b9a8495 (diff)
downloadrsyslog-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 'msg.c')
-rw-r--r--msg.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/msg.c b/msg.c
index ddf6004e..f6e015ac 100644
--- a/msg.c
+++ b/msg.c
@@ -132,13 +132,15 @@ msg_t* MsgConstruct(void)
/* Destructor for a msg "object". Must be called to dispose
* of a msg object.
*/
-void MsgDestruct(msg_t * pM)
+rsRetVal MsgDestruct(msg_t * pM)
{
assert(pM != NULL);
- /* DEV Debugging only ! dbgprintf("MsgDestruct\t0x%x, Ref now: %d\n", (int)pM, pM->iRefCount - 1); */
+ dbgprintf("MsgDestruct\t0x%lx, Ref now: %d\n", (unsigned long)pM, pM->iRefCount - 1);
+ /* DEV Debugging only ! dbgprintf("MsgDestruct\t0x%lx, Ref now: %d\n", (unsigned long)pM, pM->iRefCount - 1); */
if(--pM->iRefCount == 0)
{
- /* DEV Debugging Only! dbgprintf("MsgDestruct\t0x%x, RefCount now 0, doing DESTROY\n", (int)pM); */
+ dbgprintf("MsgDestruct\t0x%lx, RefCount now 0, doing DESTROY\n", (unsigned long)pM);
+ /* DEV Debugging Only! dbgprintf("MsgDestruct\t0x%lx, RefCount now 0, doing DESTROY\n", (unsigned long)pM); */
if(pM->pszUxTradMsg != NULL)
free(pM->pszUxTradMsg);
if(pM->pszRawMsg != NULL)
@@ -189,6 +191,8 @@ void MsgDestruct(msg_t * pM)
rsCStrDestruct(pM->pCSMSGID);
free(pM);
}
+
+ return RS_RET_OK;
}
@@ -1934,8 +1938,6 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
*/
BEGINObjClassInit(Msg)
OBJSetMethodHandler(objMethod_SERIALIZE, MsgSerialize);
-printf("MSgSerialize pointer: %lx\n", (unsigned long) MsgSerialize);
-printf("Msg objInfo: %lx\n", pObjInfoOBJ );
ENDObjClassInit
/*