summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-05 16:37:16 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-05 16:37:16 +0000
commit1560e84ff87dafd0d8b4fef3294a7a412e95b1c3 (patch)
treebf5c11bc46e720b0270889375522dbb19dbef336 /action.c
parent23910636176e49b47cb7c110c09dbbe0c7bdc9ca (diff)
downloadrsyslog-1560e84ff87dafd0d8b4fef3294a7a412e95b1c3.tar.gz
rsyslog-1560e84ff87dafd0d8b4fef3294a7a412e95b1c3.tar.xz
rsyslog-1560e84ff87dafd0d8b4fef3294a7a412e95b1c3.zip
moved date/time handling functions to their own object (2nd pass)
Diffstat (limited to 'action.c')
-rw-r--r--action.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/action.c b/action.c
index 5095993a..0fee9b23 100644
--- a/action.c
+++ b/action.c
@@ -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));