summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2008-11-10 21:29:19 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2008-11-10 21:29:19 +0000
commit11802a4868ef558ab127a5dcac1207b60a1a26e4 (patch)
tree791e84115323a56de19e60ace1e34f7b293523c9
parentf3a9cac4b6c0d4278168c96588d1cc2a59574c24 (diff)
rename h_errno field into getaddrinfo_error, to avoid confusion with errno.
h_errno has been obsoleted since the gethostbyname() --> getaddrinfo() replacement. ok gilles@
-rw-r--r--usr.sbin/smtpd/lka.c6
-rw-r--r--usr.sbin/smtpd/queue.c6
-rw-r--r--usr.sbin/smtpd/smtpd.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index 8d18a2b5ba4..d806b513801 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.2 2008/11/05 12:14:45 sobrado Exp $ */
+/* $OpenBSD: lka.c,v 1.3 2008/11/10 21:29:18 chl Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -533,9 +533,9 @@ lka_dispatch_queue(int sig, short event, void *p)
}
batchp->ss_cnt = j;
- batchp->h_errno = 0;
+ batchp->getaddrinfo_error = 0;
if (j == 0)
- batchp->h_errno = error;
+ batchp->getaddrinfo_error = error;
imsg_compose(ibuf, IMSG_LKA_MX_LOOKUP, 0, 0, -1, batchp, sizeof(*batchp));
if (mx != lmx)
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index e6ee6c38f29..8c00308eac9 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.6 2008/11/10 17:24:24 deraadt Exp $ */
+/* $OpenBSD: queue.c,v 1.7 2008/11/10 21:29:18 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -1014,7 +1014,7 @@ queue_batch_resolved(struct smtpd *env, struct batch *lookup)
struct batch *batchp;
batchp = batch_by_id(env, lookup->id);
- batchp->h_errno = lookup->h_errno;
+ batchp->getaddrinfo_error = lookup->getaddrinfo_error;
batchp->ss_cnt = lookup->ss_cnt;
/*
@@ -1028,7 +1028,7 @@ queue_batch_resolved(struct smtpd *env, struct batch *lookup)
*/
- switch (batchp->h_errno) {
+ switch (batchp->getaddrinfo_error) {
case EAI_ADDRFAMILY:
case EAI_BADFLAGS:
case EAI_BADHINTS:
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index b5737d558d9..e0cb5e6553f 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.5 2008/11/10 20:10:38 chl Exp $ */
+/* $OpenBSD: smtpd.h,v 1.6 2008/11/10 21:29:18 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -490,7 +490,7 @@ struct batch {
char hostname[MAXHOSTNAMELEN];
char errorline[STRLEN];
- u_int8_t h_errno;
+ u_int8_t getaddrinfo_error;
struct sockaddr_storage ss[MXARRAYSIZE*2];
u_int8_t ss_cnt;
u_int8_t ss_off;