Changeset 979

Show
Ignore:
Timestamp:
03/18/07 20:33:08 (6 years ago)
Author:
ahu
Message:

silence (correct) valgrind warning, plus add ComboAddress? 'toStringWithPort'

Location:
trunk/pdns/pdns
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/iputils.hh

    r923 r979  
    3535#include <boost/tuple/tuple.hpp> 
    3636#include <boost/tuple/tuple_comparison.hpp> 
     37#include <boost/lexical_cast.hpp> 
    3738 
    3839using namespace std; 
     
    162163       
    163164    return tmp; 
     165  } 
     166 
     167  string toStringWithPort() const 
     168  { 
     169    if(sin4.sin_family==AF_INET) 
     170      return toString() + ":" + boost::lexical_cast<string>(ntohs(sin4.sin_port)); 
     171    else 
     172      return "["+toString() + "]:" + boost::lexical_cast<string>(ntohs(sin4.sin_port)); 
    164173  } 
    165174}; 
  • trunk/pdns/pdns/zoneparser-tng.cc

    r978 r979  
    8989bool ZoneParserTNG::getTemplateLine() 
    9090{ 
    91   if(d_templatecounter > d_templatestop || d_templateparts.empty()) // no template, or done with 
     91  if(d_templateparts.empty() || d_templatecounter > d_templatestop) // no template, or done with 
    9292    return false; 
    9393