From 018f3758e4119e4545d9a3afff8a919b6cd7ce87 Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Thu, 27 Sep 2012 19:50:08 +0000 Subject: When merging messages from an update, decrement the message counter if the message already exists in the main queue, otherwise it's counted twice. ok gilles@ --- usr.sbin/smtpd/scheduler_ramqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/smtpd/scheduler_ramqueue.c b/usr.sbin/smtpd/scheduler_ramqueue.c index 18179f24803..67b463cb350 100644 --- a/usr.sbin/smtpd/scheduler_ramqueue.c +++ b/usr.sbin/smtpd/scheduler_ramqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scheduler_ramqueue.c,v 1.21 2012/09/11 08:37:52 eric Exp $ */ +/* $OpenBSD: scheduler_ramqueue.c,v 1.22 2012/09/27 19:50:07 eric Exp $ */ /* * Copyright (c) 2012 Gilles Chehade @@ -194,7 +194,6 @@ scheduler_ramqueue_commit(uint32_t msgid) rq_queue_schedule(&ramqueue); free(update); - stat_decrement("scheduler.ramqueue.update", 1); } @@ -457,6 +456,7 @@ rq_queue_merge(struct rq_queue *rq, struct rq_queue *update) envelope->message = tomessage; tree_merge(&tomessage->envelopes, &message->envelopes); free(message); + stat_decrement("scheduler.ramqueue.message", 1); } sorted_merge(&rq->pending, &update->pending); -- cgit v1.2.3