mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 06:14:09 +00:00
Fixed some issues with DNS_LOCAL_HOSTLIST
This commit is contained in:
parent
67a3976a24
commit
c3f7107e2b
@ -193,7 +193,7 @@ struct dns_table_entry {
|
||||
void *arg;
|
||||
};
|
||||
|
||||
#ifdef DNS_LOCAL_HOSTLIST
|
||||
#if DNS_LOCAL_HOSTLIST
|
||||
/** struct used for local host-list */
|
||||
struct local_hostlist_entry {
|
||||
/** static hostname */
|
||||
@ -455,9 +455,9 @@ static u32_t
|
||||
dns_lookup(const char *name)
|
||||
{
|
||||
u8_t i;
|
||||
#if DNS_LOCAL_HOSTLIST
|
||||
u32_t addr;
|
||||
|
||||
#if DNS_LOCAL_HOSTLIST
|
||||
if ((addr = dns_lookup_static(name)) != INADDR_NONE) {
|
||||
return addr;
|
||||
}
|
||||
@ -474,7 +474,7 @@ dns_lookup(const char *name)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return INADDR_NONE;
|
||||
}
|
||||
|
||||
#if DNS_DOES_NAME_CHECK
|
||||
|
@ -161,7 +161,7 @@
|
||||
#if (TCP_QUEUE_OOSEQ && !LWIP_TCP)
|
||||
#error "TCP_QUEUE_OOSEQ requires LWIP_TCP"
|
||||
#endif
|
||||
#if (DNS_LOCAL_HOSTLIST && !(defined(DNS_LOCAL_HOSTLIST_INIT)))
|
||||
#if (DNS_LOCAL_HOSTLIST && !DNS_LOCAL_HOSTLIST_IS_DYNAMIC && !(defined(DNS_LOCAL_HOSTLIST_INIT)))
|
||||
#error "you have to define define DNS_LOCAL_HOSTLIST_INIT {{'host1', 0x123}, {'host2', 0x234}} to initialize DNS_LOCAL_HOSTLIST"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user