From 935144b3a35795d3207018c89d3fe75f8ea2bd10 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Tue, 18 Oct 2011 20:56:08 +0200 Subject: [PATCH] fixed bug #34592: lwip_gethostbyname_r uses nonstandard error value, removed those unused (nonstandard?) error values from arch.h --- CHANGELOG | 4 ++++ src/api/netdb.c | 2 +- src/include/lwip/arch.h | 21 --------------------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e97ed953..130222e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,10 @@ HISTORY ++ Bugfixes: + 2011-10-18: Simon Goldschmidt + * arch.h, netdb.c: fixed bug #34592: lwip_gethostbyname_r uses nonstandard + error value + 2011-10-18: Simon Goldschmidt * opt.h: fixed default values of TCP_SNDLOWAT and TCP_SNDQUEUELOWAT for small windows (bug #34176 select after non-blocking send times out) diff --git a/src/api/netdb.c b/src/api/netdb.c index a7e4e06b..afce2b7b 100644 --- a/src/api/netdb.c +++ b/src/api/netdb.c @@ -200,7 +200,7 @@ lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, err = netconn_gethostbyname(name, &(h->addr)); if (err != ERR_OK) { LWIP_DEBUGF(DNS_DEBUG, ("lwip_gethostbyname(%s) failed, err=%d\n", name, err)); - *h_errnop = ENSRNOTFOUND; + *h_errnop = HOST_NOT_FOUND; return -1; } diff --git a/src/include/lwip/arch.h b/src/include/lwip/arch.h index 524af6be..4d6df773 100644 --- a/src/include/lwip/arch.h +++ b/src/include/lwip/arch.h @@ -204,27 +204,6 @@ extern "C" { #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ - -#define ENSROK 0 /* DNS server returned answer with no data */ -#define ENSRNODATA 160 /* DNS server returned answer with no data */ -#define ENSRFORMERR 161 /* DNS server claims query was misformatted */ -#define ENSRSERVFAIL 162 /* DNS server returned general failure */ -#define ENSRNOTFOUND 163 /* Domain name not found */ -#define ENSRNOTIMP 164 /* DNS server does not implement requested operation */ -#define ENSRREFUSED 165 /* DNS server refused query */ -#define ENSRBADQUERY 166 /* Misformatted DNS query */ -#define ENSRBADNAME 167 /* Misformatted domain name */ -#define ENSRBADFAMILY 168 /* Unsupported address family */ -#define ENSRBADRESP 169 /* Misformatted DNS reply */ -#define ENSRCONNREFUSED 170 /* Could not contact DNS servers */ -#define ENSRTIMEOUT 171 /* Timeout while contacting DNS servers */ -#define ENSROF 172 /* End of file */ -#define ENSRFILE 173 /* Error reading file */ -#define ENSRNOMEM 174 /* Out of memory */ -#define ENSRDESTRUCTION 175 /* Application terminated lookup */ -#define ENSRQUERYDOMAINTOOLONG 176 /* Domain name is too long */ -#define ENSRCNAMELOOP 177 /* Domain name is too long */ - #ifndef errno extern int errno; #endif