Changeset 1272

Show
Ignore:
Timestamp:
11/15/08 20:58:30 (22 months ago)
Author:
ahu
Message:

make single threaded mode more resilient against exceptions - thanks Daniel Drown

Location:
trunk/pdns/pdns
Files:
2 modified

Legend:

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

    r1215 r1272  
    242242    Answer *a; 
    243243 
    244     a=b->question(q); 
     244    try { 
     245      a=b->question(q); // a can be NULL! 
     246    } 
     247    catch(const AhuException &e) { 
     248      L<<Logger::Error<<"Backend error: "<<e.reason<<endl; 
     249      delete b; 
     250      b=0; 
     251      return 0; 
     252    } 
     253    catch(...) { 
     254      L<<Logger::Error<<Logger::NTLog<<"Caught unknown exception in Distributor thread "<<(unsigned long)pthread_self()<<endl; 
     255      delete b; 
     256      b=0; 
     257      return 0; 
     258    } 
     259 
    245260 
    246261    AnswerData AD; 
  • trunk/pdns/pdns/packethandler.cc

    r1239 r1272  
    197197 
    198198  if (p->qclass == 3 && p->qtype.getName() == "HINFO") { 
    199     rr.content = "PowerDNS $Id$"; 
     199    rr.content = "\"PowerDNS\" \"$Id$\""; 
    200200    rr.ttl = 5; 
    201201    rr.qname=target;