summaryrefslogtreecommitdiffstats
path: root/plugins/imudp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-10-07 14:26:41 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-10-07 14:26:41 +0200
commit8528344ef58b5d2907bba8809f63d0bca2ce8d38 (patch)
treea7246f6453782404f2a197ea0b96c87c6d20a03b /plugins/imudp
parentcdecd7e524a5114ccff4f2909b32738bdb33c6ea (diff)
downloadrsyslog-8528344ef58b5d2907bba8809f63d0bca2ce8d38.tar.gz
rsyslog-8528344ef58b5d2907bba8809f63d0bca2ce8d38.tar.xz
rsyslog-8528344ef58b5d2907bba8809f63d0bca2ce8d38.zip
"output" timestamp now taken from mesg's time generated
This enhances performance and, as some have pointed out, is probably also more consistent with what users expect how the various output-timestamp related function should work. This commit needs some more testing.
Diffstat (limited to 'plugins/imudp')
-rw-r--r--plugins/imudp/imudp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index d13314e8..d58a0d8e 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -155,6 +155,7 @@ BEGINrunInput
uchar fromHostIP[NI_MAXHOST];
uchar fromHostFQDN[NI_MAXHOST];
ssize_t l;
+ time_t ttGenTime;
struct syslogTime stTime;
int iNbrTimeUsed;
CODESTARTrunInput
@@ -227,10 +228,11 @@ CODESTARTrunInput
if(net.isAllowedSender(net.pAllowedSenders_UDP,
(struct sockaddr *)&frominet, (char*)fromHostFQDN)) {
if((iTimeRequery == 0) || (iNbrTimeUsed++ % iTimeRequery) == 0) {
- datetime.getCurrTime(&stTime);
+ datetime.getCurrTime(&stTime, &ttGenTime);
}
parseAndSubmitMessage(fromHost, fromHostIP, pRcvBuf, l,
- MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_NO_DELAY, (uchar*)"imudp", &stTime);
+ MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_NO_DELAY, (uchar*)"imudp",
+ &stTime, ttGenTime);
} else {
dbgprintf("%s is not an allowed sender\n", (char*)fromHostFQDN);
if(glbl.GetOption_DisallowWarning) {