summaryrefslogtreecommitdiff
path: root/src/dns.c
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-06-10 00:15:25 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-06-10 00:15:25 +0200
commita4f0c8ba21d488dd75b23e85f24279a5cd009ef6 (patch)
treecb3e4bfad65f69e729f74f70263be27b846e5c6e /src/dns.c
parentbe938ebb2b3c31f6b5138d3ab5b8ede3ee9f1185 (diff)
fix dns bug introduced in 386e89675a50
Failed dns requests were not properly dequeued. Entering a non-existing URL in one tab, then an existing one in a second tab caused both tabs to show the page of the existing URL.
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/dns.c b/src/dns.c
index cdeff6e2..3989701d 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -430,8 +430,6 @@ static void Dns_serve_channel(int channel)
--i;
}
}
- /* set current channel free */
- srv->state = DNS_SERVER_IDLE;
}
/*
@@ -482,10 +480,9 @@ static void Dns_timeout_client(int fd, void *data)
if (srv->addr_list != NULL) {
/* DNS succeeded, let's cache it */
Dns_cache_add(srv->hostname, srv->addr_list);
- Dns_serve_channel(i);
- } else {
- srv->state = DNS_SERVER_IDLE;
}
+ Dns_serve_channel(i);
+ srv->state = DNS_SERVER_IDLE;
}
}
Dns_assign_channels();