summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-05 13:03:01 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-05 13:03:01 +0100
commit98900cfd0f414012ed937af047c07415d3d3972c (patch)
tree1470e6f68f4a7cb91ac2b2435d79f62deca36c03 /action.c
parentafe2f1dc5f46f51c92cefecd42cb7a523f0c8a6c (diff)
downloadrsyslog-98900cfd0f414012ed937af047c07415d3d3972c.tar.gz
rsyslog-98900cfd0f414012ed937af047c07415d3d3972c.tar.bz2
rsyslog-98900cfd0f414012ed937af047c07415d3d3972c.zip
consistently use msg generation time in mark msg processing
Diffstat (limited to 'action.c')
-rw-r--r--action.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/action.c b/action.c
index f6d7ae42..8349120c 100644
--- a/action.c
+++ b/action.c
@@ -1329,21 +1329,17 @@ activateActions(void)
static rsRetVal
doSubmitToActionQNotAllMarkBatch(action_t *pAction, wti_t *pWti, msg_t *pMsg)
{
- time_t now = 0;
int doProcess = 1;
time_t lastAct;
DEFiRet;
- if(now == 0) { // TODO: do in caller!
- now = datetime.GetTime(NULL); /* good time call - the only one done */
- }
/* CAS loop, we write back a bit early, but that's OK... */
/* we use reception time, not dequeue time - this is considered more appropriate and
* also faster ;) -- rgerhards, 2008-09-17 */
do {
lastAct = pAction->f_time;
if(pMsg->msgFlags & MARK) {
- if((now - lastAct) < MarkInterval / 2) {
+ if((pMsg->ttGenTime - lastAct) < MarkInterval / 2) {
doProcess = 0;
DBGPRINTF("action was recently called, ignoring mark message\n");
break; /* do not update timestamp for non-written mark messages */