diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2010-06-01 14:21:53 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2010-06-01 14:21:53 +0000 |
commit | 0078cb893f7e753d27d7e5e68d44d1a5c00e6432 (patch) | |
tree | 6297a1fa37d540138ff4e345a78b9af05c4bf39a | |
parent | 5813ffed55b49a088086dda11fd0454e7156a7e9 (diff) |
Schedule newly arrived mail immediately, ie. place it at the beginning
of the list of next items to try, or near the beginning if the schedule
contains expired mail, which is of highest priority.
-rw-r--r-- | usr.sbin/smtpd/queue.c | 5 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index fb54886a95b..6e159950f18 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.83 2010/06/01 11:27:07 jacekm Exp $ */ +/* $OpenBSD: queue.c,v 1.84 2010/06/01 14:21:52 jacekm Exp $ */ /* * Copyright (c) 2008-2010 Jacek Masiulaniec <jacekm@dobremiasto.net> @@ -180,7 +180,7 @@ queue_imsg(struct smtpd *env, struct imsgev *iev, struct imsg *imsg) batch = realloc(batch, sizeof *batch); if (batch == NULL) fatal(NULL); - batch->retry = now; + batch->retry = RETRY_NOW; queue_schedule(rq, batch); } } @@ -491,7 +491,6 @@ batch_it(struct incoming *s, char *sortkey) if (batch == NULL) return NULL; SLIST_INIT(&batch->actions); - batch->retry = 0; batch->content = s->content; strlcpy(batch->sortkey, sortkey, batch_sz - sizeof *batch); SLIST_INSERT_HEAD(&s->batches[rq], batch, entry); diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index ddb66c75ee3..85fc2d5a917 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.188 2010/05/31 23:50:28 jacekm Exp $ */ +/* $OpenBSD: smtpd.h,v 1.189 2010/06/01 14:21:52 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -385,6 +385,7 @@ struct content { }; #define NO_RETRY_EXPIRED 0 +#define RETRY_NOW 1 struct batch { SLIST_ENTRY(batch) entry; |