1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

rename h_errno field into getaddrinfo_error, to avoid confusion with errno.

h_errno has been obsoleted since the gethostbyname() --> getaddrinfo() replacement.

ok gilles@
This commit is contained in:
chl 2008-11-10 21:29:18 +00:00
parent b3c9634417
commit bd5bb70c9d
3 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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:

View File

@ -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;