mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Fixed bug #31701: Error return value from dns_gethostbyname() does not match documentation: return ERR_ARG instead of ERR_VAL if not initialized or wrong argument.
This commit is contained in:
parent
704d90f693
commit
fa092c47c8
@ -229,6 +229,11 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2010-11-20: Simon Goldschmidt
|
||||||
|
* dns.c: Fixed bug #31701: Error return value from dns_gethostbyname() does
|
||||||
|
not match documentation: return ERR_ARG instead of ERR_VAL if not
|
||||||
|
initialized or wrong argument.
|
||||||
|
|
||||||
2010-10-20: Simon Goldschmidt
|
2010-10-20: Simon Goldschmidt
|
||||||
* sockets.h: Fixed bug #31385: sizeof(struct sockaddr) is 30 but should be 16
|
* sockets.h: Fixed bug #31385: sizeof(struct sockaddr) is 30 but should be 16
|
||||||
|
|
||||||
|
@ -922,6 +922,7 @@ dns_enqueue(const char *name, dns_found_callback found, void *callback_arg)
|
|||||||
* name is already in the local names table.
|
* name is already in the local names table.
|
||||||
* - ERR_INPROGRESS enqueue a request to be sent to the DNS server
|
* - ERR_INPROGRESS enqueue a request to be sent to the DNS server
|
||||||
* for resolution if no errors are present.
|
* for resolution if no errors are present.
|
||||||
|
* - ERR_ARG: dns client not initialized or invalid hostname
|
||||||
*
|
*
|
||||||
* @param hostname the hostname that is to be queried
|
* @param hostname the hostname that is to be queried
|
||||||
* @param addr pointer to a ip_addr_t where to store the address if it is already
|
* @param addr pointer to a ip_addr_t where to store the address if it is already
|
||||||
@ -941,7 +942,7 @@ dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback foun
|
|||||||
if ((dns_pcb == NULL) || (addr == NULL) ||
|
if ((dns_pcb == NULL) || (addr == NULL) ||
|
||||||
(!hostname) || (!hostname[0]) ||
|
(!hostname) || (!hostname[0]) ||
|
||||||
(strlen(hostname) >= DNS_MAX_NAME_LENGTH)) {
|
(strlen(hostname) >= DNS_MAX_NAME_LENGTH)) {
|
||||||
return ERR_VAL;
|
return ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LWIP_HAVE_LOOPIF
|
#if LWIP_HAVE_LOOPIF
|
||||||
|
Loading…
Reference in New Issue
Block a user