Changeset 1321

Show
Ignore:
Timestamp:
12/06/08 20:44:36 (4 years ago)
Author:
ahu
Message:

indent, plus make 'notify' program a bit more powerful

Location:
trunk/pdns/pdns
Files:
2 modified

Legend:

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

    r1275 r1321  
    2828    throw runtime_error("Creating socket for incoming packets: "+stringerror()); 
    2929 
    30   ComboAddress pdns("127.0.0.1", 53); 
     30  ComboAddress local("127.0.0.1", (int)0); 
     31  if(::bind(sock, (struct sockaddr*) &local, local.getSocklen()) < 0)  
     32    throw runtime_error("Failed to bind local socket to address "+local.toString()+": "+stringerror()); 
     33 
     34  ComboAddress pdns(argv[1], 53); 
    3135  if(connect(sock, (struct sockaddr*) &pdns, pdns.getSocklen()) < 0)  
    3236    throw runtime_error("Failed to connect PowerDNS socket to address "+pdns.toString()+": "+stringerror()); 
    3337   
    3438  vector<uint8_t> outpacket; 
    35   DNSPacketWriter pw(outpacket, argv[1], QType::SOA, 1, Opcode::Notify); 
     39  DNSPacketWriter pw(outpacket, argv[2], QType::SOA, 1, Opcode::Notify); 
    3640  pw.getHeader()->id = random(); 
    3741 
  • trunk/pdns/pdns/packethandler.cc

    r1302 r1321  
    455455  DNSBackend *db; 
    456456  if(!B.superMasterBackend(p->getRemote(), p->qdomain, nsset, &account, &db)) { 
    457    L<<Logger::Error<<"Unable to find backend willing to host "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<endl; 
     457    L<<Logger::Error<<"Unable to find backend willing to host "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<endl; 
    458458    return RCode::Refused; 
    459459  }