From: Bert Hubert Date: Wed, 6 Jul 2005 07:10:24 +0000 (+0000) Subject: updates to the new TCP code - there was a bizarre typo which meant that it often... X-Git-Tag: pdns-2.9.18~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0166f4a9242d078f74182240e151581ebb9d0d1;p=thirdparty%2Fpdns.git updates to the new TCP code - there was a bizarre typo which meant that it often would not work git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@434 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/lwres.cc b/pdns/lwres.cc index cf77c93f7e..7068bcb9ff 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -1,11 +1,10 @@ /* PowerDNS Versatile Database Driven Nameserver - Copyright (C) 2002 PowerDNS.COM BV + Copyright (C) 2002 - 2005 PowerDNS.COM BV This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -103,14 +102,14 @@ int LWRes::asyncresolve(const string &ip, const char *domain, int type, bool doT string packet=string(lenP, lenP+2)+string(msgP, msgP+p.len); if(asendtcp(packet, &s) == 0) { - cerr<<"asendtcp: timeout"< nameservers, string auth, const string &qna } result=d_lwr.result(); + + if(d_lwr.d_tcbit) { + if(!doTCP) { + doTCP=true; + LOG< nameservers, string auth, const string &qna return doResolve(newtarget, qtype, ret,0,beenthere2); } if(nsset.empty() && !d_lwr.d_rcode) { - if(!negindic && d_lwr.d_tcbit) { - if(!doTCP) { - doTCP=true; - LOG<