summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-08 13:37:19 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-08 13:37:19 +0000
commit8d0a174a86d29dbec6412cb1bd38f87b3b3c059b (patch)
treebcaf1c0cdbdd015eb3366d9af5ec4f9a2ddf9e4a /msg.c
parent47ccbe9c67c0b3ca518449d80be387ca09904026 (diff)
downloadrsyslog-8d0a174a86d29dbec6412cb1bd38f87b3b3c059b.tar.gz
rsyslog-8d0a174a86d29dbec6412cb1bd38f87b3b3c059b.tar.xz
rsyslog-8d0a174a86d29dbec6412cb1bd38f87b3b3c059b.zip
- first implementation of "disk" queue mode finished. It still needs some
work and the deserializer needs also to be expanded, but the queue at least performs well now. - fixed a race condition that could occur when input modules were terminated
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/msg.c b/msg.c
index 3e34ac1c..ca9678b2 100644
--- a/msg.c
+++ b/msg.c
@@ -2122,6 +2122,18 @@ rsRetVal MsgSetProperty(msg_t *pThis, property_t *pProp)
#undef isProp
+/* This is a construction finalizer that must be called after all properties
+ * have been set. It does some final work on the message object. After this
+ * is done, the object is considered ready for full processing.
+ * rgerhards, 2008-07-08
+ */
+static rsRetVal MsgConstructFinalizer(msg_t *pThis)
+{
+ MsgPrepareEnqueue(pThis);
+ return RS_RET_OK;
+}
+
+
/* Initialize the message class. Must be called as the very first method
* before anything else is called inside this class.
* rgerhards, 2008-01-04
@@ -2129,6 +2141,7 @@ rsRetVal MsgSetProperty(msg_t *pThis, property_t *pProp)
BEGINObjClassInit(Msg, 1)
OBJSetMethodHandler(objMethod_SERIALIZE, MsgSerialize);
OBJSetMethodHandler(objMethod_SETPROPERTY, MsgSetProperty);
+ OBJSetMethodHandler(objMethod_CONSTRUCTION_FINALIZER, MsgConstructFinalizer);
/* initially, we have no need to lock message objects */
funcLock = MsgLockingDummy;
funcUnlock = MsgLockingDummy;