Fixed some issues with DNS_LOCAL_HOSTLIST

This commit is contained in:
goldsimon 2009-04-23 16:54:30 +00:00
parent 67a3976a24
commit c3f7107e2b
2 changed files with 4 additions and 4 deletions

View File

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

View File

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