diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-27 19:50:08 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-27 19:50:08 +0000 |
commit | 018f3758e4119e4545d9a3afff8a919b6cd7ce87 (patch) | |
tree | 01f5103e89533b173a123b90024bf939b691cfa6 | |
parent | 08b19a7b37c694696aeb7dddc70f6f567166155e (diff) |
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@
-rw-r--r-- | usr.sbin/smtpd/scheduler_ramqueue.c | 4 |
1 files 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 <gilles@openbsd.org> @@ -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); |