Changeset 756 for trunk/cgi-bin


Ignore:
Timestamp:
07/28/15 17:47:57 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Update addMaster() to insert reference records in dnsavail table. See #41.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r754 r756  
    756756      my @fails;
    757757      ##fixme:  remove hardcoding where possible
     758      my $dasth = $dbh->prepare("INSERT INTO dnsavail (zone,location,parent_alloc) VALUES (?,?,?)");
    758759      foreach my $subzone (@zonelist) {
    759760        my %rpcargs = (
     
    765766          state => 1,   # could make them globally configurable maybe
    766767        );
    767         if ($rpc_url && !_rpc('addRDNS', %rpcargs)) {
    768           push @fails, ("$subzone" => $errstr);
     768        if ($rpc_url) {
     769          if (!_rpc('addRDNS', %rpcargs)) {
     770            push @fails, ("$subzone" => $errstr);
     771          } else {
     772            $dasth->execute($subzone, $args{defloc}, $mid)
     773                or push @fails, ("$subzone" => "rDNS added but failed to track locally: ".$dasth->errstr."\n");
     774          }
    769775        }
    770776      }
Note: See TracChangeset for help on using the changeset viewer.