BugID:23251508: Fix DNS compile issue
@@ -1178,7 +1178,7 @@ dns_check_entry(u8_t i)
break;
case DNS_STATE_ASKING:
if (--entry->tmr == 0) {
- if (++entry->retries == DNS_MAX_RETRIES) {
+ if (++entry->retries == DNS_MAX_RETRIES * num_dns) {
if (dns_backupserver_available(entry)
#if LWIP_DNS_SUPPORT_MDNS_QUERIES
&& !entry->is_mdns
@@ -1186,11 +1186,14 @@ dns_check_entry(u8_t i)
) {
entry->tmr = 1;
entry->retries = 0;
-
+ } else {
LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": timeout\n", entry->name));
+ /* call specified callback function if provided */
dns_call_found(i, NULL);
+ /* flush this entry */
entry->state = DNS_STATE_UNUSED;
break;
+ }
} else {
entry->tmr = 1 << entry->retries;
/**
@@ -1245,7 +1248,6 @@ dns_check_entry(u8_t i)
break;
}
}
-}
/**
* Call dns_check_entry for each entry in dns_table - check all entries.
