]> granicus.if.org Git - pdns/commitdiff
remove some whitespace, add an 'MX' record to sample pipe backend script, plus remove...
authorBert Hubert <bert.hubert@netherlabs.nl>
Wed, 3 Oct 2012 18:22:27 +0000 (18:22 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Wed, 3 Oct 2012 18:22:27 +0000 (18:22 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2735 d19b8d6e-7fed-0310-83ef-9ca221ded41b

modules/pipebackend/backend-v3.pl
modules/pipebackend/pipebackend.cc

index c4d08fe16bea68e08962a4bf3b8276cb84adf17b..84d67729be0f04a3e8a7451685830f028dab8543 100755 (executable)
@@ -43,7 +43,7 @@ while(<>)
                print "DATA     $bits   $auth   $qname  $qclass NS      3600    -1      ns2.example.com\n";
        }
        if(($qtype eq "TXT" || $qtype eq "ANY") && $qname eq "example.com") {
-               print STDERR "$$ Sent NS records\n";
+               print STDERR "$$ Sent TXT records\n";
                print "DATA     $bits   $auth   $qname  $qclass TXT     3600    -1      \"hallo allemaal!\"\n";
        }
        if(($qtype eq "A" || $qtype eq "ANY") && $qname eq "webserver.example.com") {
@@ -52,13 +52,13 @@ while(<>)
                print "DATA     $bits   $auth   $qname  $qclass A       3600    -1      1.2.3.5\n";
                print "DATA     $bits   $auth   $qname  $qclass A       3600    -1      1.2.3.6\n";
        }
-       elsif(($qtype eq "CNAME" || $qtype eq "ANY") && $qname eq "www.example.com") {
+       if(($qtype eq "CNAME" || $qtype eq "ANY") && $qname eq "www.example.com") {
                print STDERR "$$ Sent CNAME records\n";
                print "DATA     $bits   $auth   $qname  $qclass CNAME   3600    -1      webserver.example.com\n";
        }
-       elsif($qtype eq "MBOXFW") {
-               print STDERR "$$ Sent MBOXFW records\n";
-               print "DATA     $bits   $auth   $qname  $qclass MBOXFW  3600    -1      powerdns\@example.com\n";
+       if(($qtype eq "MX" || $qtype eq "ANY") && $qname eq "example.com") {
+               print STDERR "$$ Sent MX records\n";
+               print "DATA     $bits   $auth   $qname  $qclass MX      3600    -1      25      smtp.powerdns.com\n";
        }
 
 
index 255eb7c6ba7b457cae3494fc4fb54b186ada0b30..e67a4b7d86e4121b3f7550635dd9956696264c15 100644 (file)
@@ -196,7 +196,6 @@ bool PipeBackend::get(DNSResourceRecord &r)
      extraFields = 2;
      
    for(;;) {
-     
       d_coproc->receive(line);
       vector<string>parts;
       stringtok(parts,line,"\t");
@@ -233,8 +232,6 @@ bool PipeBackend::get(DNSResourceRecord &r)
          r.ttl=atoi(parts[4+extraFields].c_str());
          r.domain_id=atoi(parts[5+extraFields].c_str());
          
-         
          if(r.qtype.getCode() != QType::MX && r.qtype.getCode() != QType::SRV) {
            r.content.clear();
            for(unsigned int n= 6 + extraFields; n < parts.size(); ++n) {