~ubuntu-branches/ubuntu/maverick/pdns/maverick-updates

« back to all changes in this revision

Viewing changes to pdns/communicator.cc

  • Committer: Bazaar Package Importer
  • Author(s): Debian PowerDNS Maintainers
  • Date: 2006-05-06 10:40:44 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060506104044-v9hczzfl7dcri6qt
Tags: 2.9.20-3
Disable the recursor, this is in a separate package now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "arguments.hh"
31
31
#include "session.hh"
32
32
#include "packetcache.hh"
 
33
#include <boost/lexical_cast.hpp>
 
34
 
 
35
using namespace boost;
33
36
 
34
37
void CommunicatorClass::addSuckRequest(const string &domain, const string &master, bool priority)
35
38
{
86
89
          return;
87
90
        }
88
91
        i->domain_id=domain_id;
 
92
        if(i->qtype.getCode()>=1024)
 
93
          throw DBException("Database can't store unknown record type "+lexical_cast<string>(i->qtype.getCode()-1024));
 
94
 
89
95
        di.backend->feedRecord(*i);
90
96
      }
91
97
    }
317
323
  bool purged;
318
324
  while(d_nq.getOne(domain, ip, &id, purged)) {
319
325
    if(!purged) {
320
 
      d_nresolver.notify(d_nsock,domain,ip,id);
321
 
      drillHole(domain,ip);
 
326
      try {
 
327
        d_nresolver.notify(d_nsock, domain, ip, id);
 
328
        drillHole(domain, ip);
 
329
      }
 
330
      catch(ResolverException &re) {
 
331
        L<<Logger::Error<<"Error trying to resolve '"+ip+"' for notifying '"+domain+"' to server: "+re.reason<<endl;
 
332
      }
322
333
    }
323
334
    else
324
335
      L<<Logger::Error<<Logger::NTLog<<"Notification for "<<domain<<" to "<<ip<<" failed after retries"<<endl;
393
404
 
394
405
void CommunicatorClass::notify(const string &domain, const string &ip)
395
406
{
396
 
  d_nq.add(domain,ip);
 
407
  d_nq.add(domain, ip);
397
408
 
398
409
  d_any_sem.post();
399
410
}