summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2012-01-12 23:17:03 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2012-01-12 23:17:03 +0000
commit662b43e6821aa5209831b75e50410d6d8083a178 (patch)
tree26797cf4ab988f1f87f4be69ac19f37c9e37edcf
parent5f10cdb7b1ae0464e5be5a94742899a679ae4232 (diff)
we should never use ramqueue_first_envelope() as a mean to determine the
first schedulable envelope otherwise we end up with nsched wrong ... heck, let's kill ramqueue_first_envelope() and be done with it ;)
-rw-r--r--usr.sbin/smtpd/ramqueue.c8
-rw-r--r--usr.sbin/smtpd/runner.c4
2 files changed, 3 insertions, 9 deletions
diff --git a/usr.sbin/smtpd/ramqueue.c b/usr.sbin/smtpd/ramqueue.c
index 929c9cd6ab6..16534fb3e79 100644
--- a/usr.sbin/smtpd/ramqueue.c
+++ b/usr.sbin/smtpd/ramqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ramqueue.c,v 1.30 2012/01/12 22:40:16 gilles Exp $ */
+/* $OpenBSD: ramqueue.c,v 1.31 2012/01/12 23:17:02 gilles Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -87,12 +87,6 @@ ramqueue_host_is_empty(struct ramqueue_host *rq_host)
}
struct ramqueue_envelope *
-ramqueue_first_envelope(struct ramqueue *rqueue)
-{
- return TAILQ_FIRST(&rqueue->queue);
-}
-
-struct ramqueue_envelope *
ramqueue_next_envelope(struct ramqueue *rqueue)
{
struct ramqueue_envelope *rq_evp = NULL;
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c
index 5dcbafeb33d..6c29360970c 100644
--- a/usr.sbin/smtpd/runner.c
+++ b/usr.sbin/smtpd/runner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: runner.c,v 1.130 2012/01/12 22:59:55 eric Exp $ */
+/* $OpenBSD: runner.c,v 1.131 2012/01/12 23:17:02 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -297,7 +297,7 @@ runner_timeout(int fd, short event, void *p)
nsched = 0;
again:
- rq_evp = ramqueue_first_envelope(rqueue);
+ rq_evp = ramqueue_next_envelope(rqueue);
if (rq_evp)
nsched = rq_evp->sched;