From d808896e0dfa1e36351dced8cbfef1ffd42bc174 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 23 May 2018 19:06:18 +0200 Subject: [PATCH] dnsproxy: whitespace-only commit for clarity --- pdns/dnsproxy.cc | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/pdns/dnsproxy.cc b/pdns/dnsproxy.cc index 2f16a325ec..b15a52658f 100644 --- a/pdns/dnsproxy.cc +++ b/pdns/dnsproxy.cc @@ -244,37 +244,37 @@ void DNSProxy::mainloop(void) /* Set up iov and msgh structures. */ memset(&msgh, 0, sizeof(struct msghdr)); - string reply; // needs to be alive at time of sendmsg! - if(i->second.complete) { - - MOADNSParser mdp(false, p.getString()); - // cerr<<"Got completion, "<first.d_place-1<<" "<first.d_label<<" " << DNSRecordContent::NumberToType(j->first.d_type)<<" "<first.d_content->getZoneRepresentation()<first.d_place == DNSResourceRecord::ANSWER || (j->first.d_place == DNSResourceRecord::AUTHORITY && j->first.d_type == QType::SOA)) { - - if(j->first.d_type == i->second.qtype || (i->second.qtype == QType::ANY && (j->first.d_type == QType::A || j->first.d_type == QType::AAAA))) { + string reply; // needs to be alive at time of sendmsg! + if(i->second.complete) { + + MOADNSParser mdp(false, p.getString()); + // cerr<<"Got completion, "<first.d_place-1<<" "<first.d_label<<" " << DNSRecordContent::NumberToType(j->first.d_type)<<" "<first.d_content->getZoneRepresentation()<first.d_place == DNSResourceRecord::ANSWER || (j->first.d_place == DNSResourceRecord::AUTHORITY && j->first.d_type == QType::SOA)) { + + if(j->first.d_type == i->second.qtype || (i->second.qtype == QType::ANY && (j->first.d_type == QType::A || j->first.d_type == QType::AAAA))) { DNSZoneRecord dzr; - dzr.dr.d_name=i->second.aname; - dzr.dr.d_type = j->first.d_type; - dzr.dr.d_ttl=j->first.d_ttl; - dzr.dr.d_place= j->first.d_place; - dzr.dr.d_content=j->first.d_content; - i->second.complete->addRecord(dzr); - } - } - } - i->second.complete->setRcode(mdp.d_header.rcode); - reply=i->second.complete->getString(); - iov.iov_base = (void*)reply.c_str(); - iov.iov_len = reply.length(); - delete i->second.complete; - i->second.complete=0; - } - else { - iov.iov_base = buffer; - iov.iov_len = len; - } + dzr.dr.d_name=i->second.aname; + dzr.dr.d_type = j->first.d_type; + dzr.dr.d_ttl=j->first.d_ttl; + dzr.dr.d_place= j->first.d_place; + dzr.dr.d_content=j->first.d_content; + i->second.complete->addRecord(dzr); + } + } + } + i->second.complete->setRcode(mdp.d_header.rcode); + reply=i->second.complete->getString(); + iov.iov_base = (void*)reply.c_str(); + iov.iov_len = reply.length(); + delete i->second.complete; + i->second.complete=0; + } + else { + iov.iov_base = buffer; + iov.iov_len = len; + } msgh.msg_iov = &iov; msgh.msg_iovlen = 1; msgh.msg_name = (struct sockaddr*)&i->second.remote; @@ -286,7 +286,7 @@ void DNSProxy::mainloop(void) } if(sendmsg(i->second.outsock, &msgh, 0) < 0) g_log<second.created=0; } } -- 2.47.2