]> granicus.if.org Git - pdns/commitdiff
shave 25% off packet generation times (32usec -> 25 usec or so)
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 24 Aug 2008 14:18:33 +0000 (14:18 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 24 Aug 2008 14:18:33 +0000 (14:18 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1258 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnswriter.cc

index 4befa4ff67b499cfa5efe3dd45ed2e3eb92d0150..d56e5f0f5e1827391f8b8b7f9ee6588fe4fc8d6b 100644 (file)
@@ -67,7 +67,7 @@ void DNSPacketWriter::startRecord(const string& name, uint16_t qtype, uint32_t t
   d_stuff = 0; 
   d_rollbackmarker=d_content.size();
 
-  if(iequals(d_qname,d_recordqname)) {  // don't do the whole label compression thing if we *know* we can get away with "see question"
+  if(!strcasecmp(d_qname.c_str(), d_recordqname.c_str())) {  // don't do the whole label compression thing if we *know* we can get away with "see question"
     static char marker[2]={0xc0, 0x0c};
     d_content.insert(d_content.end(), &marker[0], &marker[2]);
   }
@@ -158,7 +158,7 @@ DNSPacketWriter::lmap_t::iterator find(DNSPacketWriter::lmap_t& lmap, const stri
 {
   DNSPacketWriter::lmap_t::iterator ret;
   for(ret=lmap.begin(); ret != lmap.end(); ++ret)
-    if(iequals(ret->first,label))
+    if(!strcasecmp(ret->first.c_str() ,label.c_str()))
       break;
   return ret;
 }