diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-06 12:07:53 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-06 12:07:53 +0200 |
commit | b849df20045ca5dfec36cdff5641e8a78d326b49 (patch) | |
tree | 7c518f7679e19ef498e81f1b7fcfea553bb67717 /runtime/msg.c | |
parent | 1e53745dc9f11a90c613d177b2caba563c2b83be (diff) | |
parent | 39000a62024510cd62607200e6100e3cd7c05005 (diff) | |
download | rsyslog-b849df20045ca5dfec36cdff5641e8a78d326b49.tar.gz rsyslog-b849df20045ca5dfec36cdff5641e8a78d326b49.tar.xz rsyslog-b849df20045ca5dfec36cdff5641e8a78d326b49.zip |
Merge branch 'master' into perf
Conflicts:
ChangeLog
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index ac387354..69296710 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -257,7 +257,16 @@ rsRetVal msgConstruct(msg_t **ppThis) pM->iRefCount = 1; pM->iSeverity = -1; pM->iFacility = -1; + + /* we initialize both timestamps to contain the current time, so that they + * are consistent. Also, this saves us from doing any further time calls just + * to obtain a timestamp. The memcpy() should not really make a difference, + * especially as I think there is no codepath currently where it would not be + * required (after I have cleaned up the pathes ;)). -- rgerhards, 2008-10-02 + */ datetime.getCurrTime(&(pM->tRcvdAt)); + memcpy(&pM->tTIMESTAMP, &pM->tRcvdAt, sizeof(struct syslogTime)); + objConstructSetObjInfo(pM); /* DEV debugging only! dbgprintf("msgConstruct\t0x%x, ref 1\n", (int)pM);*/ |