summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-11-03 17:16:10 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-03 17:16:10 +0100
commit89667762cff9aca81f93f149bf1e853234074780 (patch)
treea4b37910356619ac00aacc1a0922b29fdea1dbcd /runtime/msg.c
parent8c32e9d36f1fc5476f4711905104970db345b3f9 (diff)
parent5a643669221363a49fb36cfb2acc64dc29b53a14 (diff)
downloadrsyslog-89667762cff9aca81f93f149bf1e853234074780.tar.gz
rsyslog-89667762cff9aca81f93f149bf1e853234074780.tar.bz2
rsyslog-89667762cff9aca81f93f149bf1e853234074780.zip
Merge branch 'master-newqueue'
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index b0b93f98..dca49a6d 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -814,6 +814,19 @@ finalize_it:
}
+/* Special msg constructor, to be used when an object is deserialized.
+ * we do only the base init as we know the properties will be set in
+ * any case by the deserializer. We still do the "inexpensive" inits
+ * just to be on the safe side. The whole process needs to be
+ * refactored together with the msg serialization subsystem.
+ */
+rsRetVal
+msgConstructForDeserializer(msg_t **ppThis)
+{
+ return msgBaseConstruct(ppThis);
+}
+
+
/* some free handlers for (slightly) complicated cases... All of them may be called
* with an empty element.
*/
@@ -3665,7 +3678,8 @@ finalize_it:
* is done, the object is considered ready for full processing.
* rgerhards, 2008-07-08
*/
-static rsRetVal msgConstructFinalizer(msg_t *pThis)
+rsRetVal
+msgConstructFinalizer(msg_t *pThis)
{
MsgPrepareEnqueue(pThis);
return RS_RET_OK;
@@ -3676,12 +3690,10 @@ static rsRetVal msgConstructFinalizer(msg_t *pThis)
* satisfies the base object class getSeverity semantics.
* rgerhards, 2008-01-14
*/
-static rsRetVal
-MsgGetSeverity(obj_t_ptr pThis, int *piSeverity)
+rsRetVal
+MsgGetSeverity(msg_t *pMsg, int *piSeverity)
{
- ISOBJ_TYPE_assert(pThis, msg);
- assert(piSeverity != NULL);
- *piSeverity = ((msg_t*) pThis)->iSeverity;
+ *piSeverity = pMsg->iSeverity;
return RS_RET_OK;
}
@@ -3982,7 +3994,6 @@ BEGINObjClassInit(msg, 1, OBJ_IS_CORE_MODULE)
OBJSetMethodHandler(objMethod_SERIALIZE, MsgSerialize);
OBJSetMethodHandler(objMethod_SETPROPERTY, MsgSetProperty);
OBJSetMethodHandler(objMethod_CONSTRUCTION_FINALIZER, msgConstructFinalizer);
- OBJSetMethodHandler(objMethod_GETSEVERITY, MsgGetSeverity);
/* initially, we have no need to lock message objects */
funcLock = MsgLockingDummy;
funcUnlock = MsgLockingDummy;