summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-09-29 10:35:02 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-09-29 10:35:02 +0000
commit6bde84180d254953697a5968a64897be7a5b9489 (patch)
treec4fe7426427c354a2989d77a65c9fb5da56be77d /usr.sbin
parent91fe15e08e22b91c8065eaa8e504ce74be8e62f1 (diff)
finally remove rule member from struct envelope.
"wow!" gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/lka.c12
-rw-r--r--usr.sbin/smtpd/lka_session.c3
-rw-r--r--usr.sbin/smtpd/smtpd.h3
3 files changed, 5 insertions, 13 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index e7aad3db9a0..7f855d88e77 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.141 2012/09/28 14:03:00 chl Exp $ */
+/* $OpenBSD: lka.c,v 1.142 2012/09/29 10:35:00 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -84,16 +84,8 @@ lka_imsg(struct imsgev *iev, struct imsg *imsg)
ss = imsg->data;
ss->code = 530;
rule = ruleset_match(&ss->envelope);
- if (rule) {
+ if (rule)
ss->code = 250;
- ss->envelope.rule = *rule;
- ss->envelope.expire = rule->r_qexpire;
- if (rule->r_action == A_RELAY ||
- rule->r_action == A_RELAYVIA)
- ss->envelope.type = D_MTA;
- else
- ss->envelope.type = D_MDA;
- }
imsg_compose_event(iev, IMSG_LKA_RULEMATCH, 0, 0, -1,
ss, sizeof *ss);
return;
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c
index 9afa1bb731f..88be6d8b656 100644
--- a/usr.sbin/smtpd/lka_session.c
+++ b/usr.sbin/smtpd/lka_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka_session.c,v 1.36 2012/09/27 18:57:25 eric Exp $ */
+/* $OpenBSD: lka_session.c,v 1.37 2012/09/29 10:35:01 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -293,6 +293,7 @@ lka_submit(struct lka_session *lks, struct rule *rule, struct expandnode *xn)
const char *tag;
ep = xmemdup(&lks->envelope, sizeof *ep, "lka_submit");
+ ep->expire = rule->r_qexpire;
switch (rule->r_action) {
case A_RELAY:
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 024777cacb4..737ca5c633c 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.373 2012/09/29 10:32:08 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.374 2012/09/29 10:35:01 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -380,7 +380,6 @@ struct envelope {
TAILQ_ENTRY(envelope) entry;
char tag[MAX_TAG_SIZE];
- struct rule rule;
uint64_t session_id;
uint64_t batch_id;