mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-02 11:49:28 -05:00
- Fix tcp timer waiting list removal code.
git-svn-id: file:///svn/unbound/trunk@3222 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
eca9b37353
commit
6a7193a016
2 changed files with 8 additions and 11 deletions
|
|
@ -1,3 +1,6 @@
|
|||
16 September 2014: Wouter
|
||||
- Fix tcp timer waiting list removal code.
|
||||
|
||||
15 September 2014: Wouter
|
||||
- Fix unit test for CDS typecode.
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ static void serviced_tcp_initiate(struct serviced_query* sq, sldns_buffer* buff)
|
|||
static int randomize_and_send_udp(struct pending* pend, sldns_buffer* packet,
|
||||
int timeout);
|
||||
|
||||
/** remove waiting tcp from the outnet waiting list */
|
||||
static void waiting_list_remove(struct outside_network* outnet,
|
||||
struct waiting_tcp* w);
|
||||
|
||||
int
|
||||
pending_cmp(const void* key1, const void* key2)
|
||||
{
|
||||
|
|
@ -1100,17 +1104,7 @@ outnet_tcptimer(void* arg)
|
|||
void* cb_arg;
|
||||
if(w->pkt) {
|
||||
/* it is on the waiting list */
|
||||
struct waiting_tcp* p=outnet->tcp_wait_first, *prev=NULL;
|
||||
while(p) {
|
||||
if(p == w) {
|
||||
if(prev) prev->next_waiting = w->next_waiting;
|
||||
else outnet->tcp_wait_first=w->next_waiting;
|
||||
outnet->tcp_wait_last = prev;
|
||||
break;
|
||||
}
|
||||
prev = p;
|
||||
p=p->next_waiting;
|
||||
}
|
||||
waiting_list_remove(outnet, w);
|
||||
} else {
|
||||
/* it was in use */
|
||||
struct pending_tcp* pend=(struct pending_tcp*)w->next_waiting;
|
||||
|
|
|
|||
Loading…
Reference in a new issue