mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 07:33:11 +00:00
dns: Drop unnecessary txid variable in dns_check_entry
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
d66442ba91
commit
f8a95aa27f
@ -938,12 +938,9 @@ dns_check_entry(u8_t i)
|
|||||||
LWIP_ASSERT("array index out of bounds", i < DNS_TABLE_SIZE);
|
LWIP_ASSERT("array index out of bounds", i < DNS_TABLE_SIZE);
|
||||||
|
|
||||||
switch (entry->state) {
|
switch (entry->state) {
|
||||||
|
case DNS_STATE_NEW:
|
||||||
case DNS_STATE_NEW: {
|
|
||||||
u16_t txid;
|
|
||||||
/* initialize new entry */
|
/* initialize new entry */
|
||||||
txid = dns_create_txid();
|
entry->txid = dns_create_txid();
|
||||||
entry->txid = txid;
|
|
||||||
entry->state = DNS_STATE_ASKING;
|
entry->state = DNS_STATE_ASKING;
|
||||||
entry->server_idx = 0;
|
entry->server_idx = 0;
|
||||||
entry->tmr = 1;
|
entry->tmr = 1;
|
||||||
@ -956,8 +953,6 @@ dns_check_entry(u8_t i)
|
|||||||
("dns_send returned error: %s\n", lwip_strerr(err)));
|
("dns_send returned error: %s\n", lwip_strerr(err)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case DNS_STATE_ASKING:
|
case DNS_STATE_ASKING:
|
||||||
if (--entry->tmr == 0) {
|
if (--entry->tmr == 0) {
|
||||||
if (++entry->retries == DNS_MAX_RETRIES) {
|
if (++entry->retries == DNS_MAX_RETRIES) {
|
||||||
|
Loading…
Reference in New Issue
Block a user