summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-10-02 15:52:24 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-10-02 15:52:24 +0200
commit02bb3c901d9b14e8a08b111dde151f1ed4d2d1da (patch)
treea54cde6c8c8be2665aa9df16f207d32106af2750 /tools
parent1908bae50491624d270c73609ea45634c15246fd (diff)
downloadrsyslog-02bb3c901d9b14e8a08b111dde151f1ed4d2d1da.tar.gz
rsyslog-02bb3c901d9b14e8a08b111dde151f1ed4d2d1da.tar.xz
rsyslog-02bb3c901d9b14e8a08b111dde151f1ed4d2d1da.zip
consolidated time calls during msg object creation
...this improves performance and consistency and also fixes a bug where subsecond time properties generated by imfile, imklog and internal messages could be slightly inconsistent.
Diffstat (limited to 'tools')
-rw-r--r--tools/syslogd.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index a39f5a5c..7a99fc1d 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -914,7 +914,6 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags)
pMsg->iFacility = LOG_FAC(pri);
pMsg->iSeverity = LOG_PRI(pri);
pMsg->bParseHOSTNAME = 0;
- datetime.getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
flags |= INTERNAL_MSG;
/* we now check if we should print internal messages out to stderr. This was
@@ -1328,7 +1327,6 @@ static int parseRFCSyslogMsg(msg_t *pMsg, int flags)
*/
/* TIMESTAMP */
- memcpy(&pMsg->tTIMESTAMP, &pMsg->tRcvdAt, sizeof(struct syslogTime));
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
if(flags & IGNDATE) {
/* we need to ignore the msg data, so simply copy over reception date */
@@ -1415,7 +1413,6 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
* message. There we go from high-to low precison and are done
* when we find a matching one. -- rgerhards, 2008-09-16
*/
- memcpy(&pMsg->tTIMESTAMP, &pMsg->tRcvdAt, sizeof(struct syslogTime));
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
/* we are done - parse pointer is moved by ParseTIMESTAMP3339 */;
} else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {