dns: fixed declaration and usage of DNS_LOOKUP_LOCAL_EXTERN()

This commit is contained in:
goldsimon 2016-07-07 13:02:47 +02:00
parent 7e3de89646
commit 811b237bd7
2 changed files with 3 additions and 3 deletions

View File

@ -616,7 +616,7 @@ dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addr
}
#endif /* DNS_LOCAL_HOSTLIST */
#ifdef DNS_LOOKUP_LOCAL_EXTERN
if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype))) {
if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype)) == ERR_OK) {
return ERR_OK;
}
#endif /* DNS_LOOKUP_LOCAL_EXTERN */

View File

@ -884,8 +884,8 @@
* byte order).
*
* Instead, you can also use an external function:
* \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name)
* that returns the IP address or INADDR_NONE if not found.
* \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype)
* that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_* is passed in dns_addrtype).
*/
#ifndef DNS_LOCAL_HOSTLIST
#define DNS_LOCAL_HOSTLIST 0