Changeset 1258

Show
Ignore:
Timestamp:
08/24/08 16:18:33 (19 months ago)
Author:
ahu
Message:

shave 25% off packet generation times (32usec -> 25 usec or so)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/dnswriter.cc

    r1232 r1258  
    6868  d_rollbackmarker=d_content.size(); 
    6969 
    70   if(iequals(d_qname,d_recordqname)) {  // don't do the whole label compression thing if we *know* we can get away with "see question" 
     70  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" 
    7171    static char marker[2]={0xc0, 0x0c}; 
    7272    d_content.insert(d_content.end(), &marker[0], &marker[2]); 
     
    159159  DNSPacketWriter::lmap_t::iterator ret; 
    160160  for(ret=lmap.begin(); ret != lmap.end(); ++ret) 
    161     if(iequals(ret->first,label)) 
     161    if(!strcasecmp(ret->first.c_str() ,label.c_str())) 
    162162      break; 
    163163  return ret;