summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/runner.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/runner.c')
-rw-r--r--usr.sbin/smtpd/runner.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c
index 5374dab1aae..277230ed45a 100644
--- a/usr.sbin/smtpd/runner.c
+++ b/usr.sbin/smtpd/runner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: runner.c,v 1.3 2008/12/07 01:55:41 gilles Exp $ */
+/* $OpenBSD: runner.c,v 1.4 2008/12/07 03:14:24 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -673,6 +673,11 @@ runner_batch_resolved(struct smtpd *env, struct batch *lookup)
*/
switch (batchp->getaddrinfo_error) {
+ case 0:
+ batchp->flags |= F_BATCH_RESOLVED;
+ for (i = 0; i < batchp->mx_cnt; ++i)
+ batchp->mxarray[i].ss = lookup->mxarray[i].ss;
+ break;
case EAI_ADDRFAMILY:
case EAI_BADFLAGS:
case EAI_BADHINTS:
@@ -704,9 +709,7 @@ runner_batch_resolved(struct smtpd *env, struct batch *lookup)
return 0;
default:
- batchp->flags |= F_BATCH_RESOLVED;
- for (i = 0; i < batchp->mx_cnt; ++i)
- batchp->mxarray[i].ss = lookup->mxarray[i].ss;
+ fatalx("runner_batch_resolved: unknown getaddrinfo error.");
}
return 1;
}