… | |
… | |
663 | } |
663 | } |
664 | |
664 | |
665 | void dns_snd::gen_syn_req () |
665 | void dns_snd::gen_syn_req () |
666 | { |
666 | { |
667 | timeout = NOW + INITIAL_SYN_TIMEOUT; |
667 | timeout = NOW + INITIAL_SYN_TIMEOUT; |
668 | |
|
|
669 | printf ("send syn\n");//D |
|
|
670 | |
668 | |
671 | pkt->flags = htons (DEFAULT_CLIENT_FLAGS); |
669 | pkt->flags = htons (DEFAULT_CLIENT_FLAGS); |
672 | pkt->qdcount = htons (1); |
670 | pkt->qdcount = htons (1); |
673 | |
671 | |
674 | int offs = 6 * 2; |
672 | int offs = 6 * 2; |
… | |
… | |
1240 | { |
1238 | { |
1241 | if (vpn->dns_sndpq.empty ()) |
1239 | if (vpn->dns_sndpq.empty ()) |
1242 | { |
1240 | { |
1243 | send = new dns_snd (this); |
1241 | send = new dns_snd (this); |
1244 | |
1242 | |
1245 | printf ("new conn %p %d\n", this, c->conf->id);//D |
|
|
1246 | cfg.reset (THISNODE->id); |
1243 | cfg.reset (THISNODE->id); |
1247 | send->gen_syn_req (); |
1244 | send->gen_syn_req (); |
1248 | } |
1245 | } |
1249 | } |
1246 | } |
1250 | else if (vpn->dns_sndpq.size () < MAX_OUTSTANDING |
1247 | else if (vpn->dns_sndpq.size () < MAX_OUTSTANDING |