diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-14 14:18:36 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-14 14:18:36 +0000 |
commit | 3a40f52f897e8e3ef7fa665504fbbe557420fb59 (patch) | |
tree | f591bf82de68d0242b6157beb894e85f47fdad6e /msg.c | |
parent | 1b4a1902031babbb3907cd0e73d86c1fa0da0a3d (diff) | |
download | rsyslog-3a40f52f897e8e3ef7fa665504fbbe557420fb59.tar.gz rsyslog-3a40f52f897e8e3ef7fa665504fbbe557420fb59.tar.bz2 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.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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; |