diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 16:37:16 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 16:37:16 +0000 |
commit | 1560e84ff87dafd0d8b4fef3294a7a412e95b1c3 (patch) | |
tree | bf5c11bc46e720b0270889375522dbb19dbef336 /action.c | |
parent | 23910636176e49b47cb7c110c09dbbe0c7bdc9ca (diff) | |
download | rsyslog-1560e84ff87dafd0d8b4fef3294a7a412e95b1c3.tar.gz rsyslog-1560e84ff87dafd0d8b4fef3294a7a412e95b1c3.tar.bz2 rsyslog-1560e84ff87dafd0d8b4fef3294a7a412e95b1c3.zip |
moved date/time handling functions to their own object (2nd pass)
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -41,12 +41,15 @@ #include "cfsysline.h" #include "srUtils.h" #include "errmsg.h" +#include "datetime.h" /* forward definitions */ rsRetVal actionCallDoAction(action_t *pAction, msg_t *pMsg); /* object static data (once for all instances) */ -DEFobjStaticHelpers +/* TODO: make this an object! DEFobjStaticHelpers -- rgerhards, 2008-03-05 */ +DEFobjCurrIf(obj) +DEFobjCurrIf(datetime) DEFobjCurrIf(module) DEFobjCurrIf(errmsg) @@ -521,8 +524,8 @@ actionWriteToAction(action_t *pAction) * ... RAWMSG is a problem ... Please note that digital * signatures inside the message are also invalidated. */ - getCurrTime(&(pMsg->tRcvdAt)); - getCurrTime(&(pMsg->tTIMESTAMP)); + datetime.getCurrTime(&(pMsg->tRcvdAt)); + datetime.getCurrTime(&(pMsg->tTIMESTAMP)); MsgSetMSG(pMsg, (char*)szRepMsg); MsgSetRawMsg(pMsg, (char*)szRepMsg); @@ -689,6 +692,7 @@ rsRetVal actionClassInit(void) DEFiRet; /* request objects we use */ CHKiRet(objGetObjInterface(&obj)); /* this provides the root pointer for all other queries */ + CHKiRet(objUse(datetime, CORE_COMPONENT)); CHKiRet(objUse(module, CORE_COMPONENT)); CHKiRet(objUse(errmsg, CORE_COMPONENT)); |