summaryrefslogtreecommitdiffstats
path: root/plugins
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 /plugins
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 'plugins')
-rw-r--r--plugins/imfile/imfile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index aa866a6d..243004ab 100644
--- a/plugins/imfile/imfile.c
+++ b/plugins/imfile/imfile.c
@@ -40,6 +40,7 @@
#include "msg.h"
#include "stream.h"
#include "errmsg.h"
+#include "datetime.h"
MODULE_TYPE_INPUT /* must be present for input modules, do not remove */
@@ -48,6 +49,7 @@ MODULE_TYPE_INPUT /* must be present for input modules, do not remove */
/* Module static data */
DEF_IMOD_STATIC_DATA /* must be present, starts static data */
DEFobjCurrIf(errmsg)
+DEFobjCurrIf(datetime)
typedef struct fileInfo_s {
uchar *pszFileName;
@@ -88,7 +90,7 @@ static rsRetVal enqLine(fileInfo_t *pInfo, cstr_t *cstrLine)
pMsg->iFacility = LOG_FAC(pInfo->iFacility);
pMsg->iSeverity = LOG_PRI(pInfo->iSeverity);
pMsg->bParseHOSTNAME = 0;
- getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
+ datetime.getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
CHKiRet(submitMsg(pMsg));
finalize_it:
RETiRet;
@@ -450,6 +452,7 @@ CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
+ CHKiRet(objUse(datetime, CORE_COMPONENT));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"inputfilename", 0, eCmdHdlrGetWord,
NULL, &pszFileName, STD_LOADABLE_MODULE_ID));