summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-14 14:18:36 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-14 14:18:36 +0000
commit3a40f52f897e8e3ef7fa665504fbbe557420fb59 (patch)
treef591bf82de68d0242b6157beb894e85f47fdad6e /msg.c
parent1b4a1902031babbb3907cd0e73d86c1fa0da0a3d (diff)
downloadrsyslog-3a40f52f897e8e3ef7fa665504fbbe557420fb59.tar.gz
rsyslog-3a40f52f897e8e3ef7fa665504fbbe557420fb59.tar.xz
rsyslog-3a40f52f897e8e3ef7fa665504fbbe557420fb59.zip
implemented $MainMsgQueueDiscardMar and $MainMsgQueueDiscardSeverity (but
serverity needs to be specified numerically for the time being)
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/msg.c b/msg.c
index 9825ea77..3ffaa6bb 100644
--- a/msg.c
+++ b/msg.c
@@ -2142,6 +2142,20 @@ static rsRetVal MsgConstructFinalizer(msg_t *pThis)
}
+/* get the severity - this is an entry point that
+ * satisfies the base object class getSeverity semantics.
+ * rgerhards, 2008-01-14
+ */
+static rsRetVal
+MsgGetSeverity(obj_t *pThis, int *piSeverity)
+{
+ ISOBJ_TYPE_assert(pThis, Msg);
+ assert(piSeverity != NULL);
+ *piSeverity = ((msg_t*) pThis)->iSeverity;
+ 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
@@ -2150,6 +2164,7 @@ BEGINObjClassInit(Msg, 1)
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;