diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2016-01-29 08:06:28 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2016-01-29 08:06:28 +0000 |
commit | ede3ee2463d83970e4283f10c30af969fada9182 (patch) | |
tree | 927c25d594f13210d93e4b5f4b445cc096d034d9 /usr.sbin/smtpd/filter.c | |
parent | 5e02101b1cde2f51c98b9d5ec0b3642bd49205b4 (diff) |
Remove the query queueing mechanism. It's useless since pipelining is
not supported anyway.
ok sunil@ gilles@
Diffstat (limited to 'usr.sbin/smtpd/filter.c')
-rw-r--r-- | usr.sbin/smtpd/filter.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/usr.sbin/smtpd/filter.c b/usr.sbin/smtpd/filter.c index 4e97923f6bb..80fd6d8c765 100644 --- a/usr.sbin/smtpd/filter.c +++ b/usr.sbin/smtpd/filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.c,v 1.12 2016/01/28 09:03:35 eric Exp $ */ +/* $OpenBSD: filter.c,v 1.13 2016/01/29 08:06:27 eric Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@poolp.org> @@ -43,7 +43,6 @@ enum { QUERY_READY, - QUERY_WAITING, QUERY_RUNNING, QUERY_DONE }; @@ -85,7 +84,6 @@ struct filter_query { uint64_t qid; int type; struct filter_session *session; - TAILQ_ENTRY(filter_query) entry; int state; int hasrun; @@ -437,7 +435,6 @@ filter_query(struct filter_session *s, int type) q->qid = generate_uid(); q->session = s; q->type = type; - TAILQ_INSERT_TAIL(&s->queries, q, entry); q->state = QUERY_READY; q->current = TAILQ_FIRST(s->filters); @@ -451,8 +448,6 @@ filter_query(struct filter_session *s, int type) static void filter_drain_query(struct filter_query *q) { - struct filter_query *prev; - log_trace(TRACE_FILTERS, "filter: filter_drain_query %s", filter_query_to_text(q)); @@ -475,19 +470,6 @@ filter_drain_query(struct filter_query *q) return; } - /* - * Do not move forward if the query ahead of us is - * waiting on this filter. - */ - prev = TAILQ_PREV(q, filter_query_lst, entry); - if (prev && prev->current == q->current) { - q->state = QUERY_WAITING; - log_trace(TRACE_FILTERS, - "filter: query blocked by previous query" - "%s", filter_query_to_text(prev)); - return; - } - q->current = TAILQ_NEXT(q->current, entry); q->hasrun = 0; } @@ -585,7 +567,6 @@ filter_end_query(struct filter_query *q) free(q->smtp.response); done: - TAILQ_REMOVE(&s->queries, q, entry); free(q); } @@ -594,7 +575,7 @@ filter_imsg(struct mproc *p, struct imsg *imsg) { struct filter_proc *proc = p->data; struct filter_session *s; - struct filter_query *q, *next; + struct filter_query *q; struct msg m; const char *line; uint64_t qid; @@ -666,15 +647,7 @@ filter_imsg(struct mproc *p, struct imsg *imsg) if (type == QUERY_EOM) q->u.datalen = datalen; - next = TAILQ_NEXT(q, entry); filter_drain_query(q); - - /* - * If there is another query after this one which is waiting, - * make it move forward. - */ - if (next && next->state == QUERY_WAITING) - filter_drain_query(next); break; case IMSG_FILTER_PIPE: |