summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2012-08-19 10:33:35 +0000
committereric <eric@openbsd.org>2012-08-19 10:33:35 +0000
commit467c22bc3fa026f3f7c9922abc305dc795dc48f4 (patch)
tree88fd57e7bace4c20b11dba00a776b6a077fe914d
parentKill envelope_{dump,load}_file() and replace them with envelope_{dump,load}_buffer(). (diff)
downloadwireguard-openbsd-467c22bc3fa026f3f7c9922abc305dc795dc48f4.tar.xz
wireguard-openbsd-467c22bc3fa026f3f7c9922abc305dc795dc48f4.zip
Let the scheduler return all schedulable envelopes for the same message
as a single batch. The route for each envelope is sorted out by the mta properly, so they are grouped as a single MAIL on each route. ok gilles@ chl@
-rw-r--r--usr.sbin/smtpd/scheduler_ramqueue.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/scheduler_ramqueue.c b/usr.sbin/smtpd/scheduler_ramqueue.c
index 44cbd31cf2c..b92195f806f 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.14 2012/08/18 18:18:23 gilles Exp $ */
+/* $OpenBSD: scheduler_ramqueue.c,v 1.15 2012/08/19 10:33:35 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@openbsd.org>
@@ -361,7 +361,6 @@ static void
scheduler_ramqueue_batch(int typemask, time_t curr, struct scheduler_batch *ret)
{
struct rq_message *message;
- struct rq_batch *batch;
struct rq_envelope *envelope;
struct id_list *item;
uint64_t evpid;
@@ -411,7 +410,6 @@ scheduler_ramqueue_batch(int typemask, time_t curr, struct scheduler_batch *ret)
return;
}
- batch = envelope->batch;
type = envelope->type;
if (type == D_BOUNCE)
ret->type = SCHED_BOUNCE;
@@ -421,7 +419,7 @@ scheduler_ramqueue_batch(int typemask, time_t curr, struct scheduler_batch *ret)
ret->type = SCHED_MTA;
i = NULL;
- while((tree_iter(&batch->envelopes, &i, &evpid, (void*)&envelope))) {
+ while((tree_iter(&message->envelopes, &i, &evpid, (void*)&envelope))) {
if (envelope->type != type)
continue;
if (envelope->sched > curr)