Changeset 671 for trunk


Ignore:
Timestamp:
01/15/15 13:42:25 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix caller-facing error reporting a little in dns-rpc.cgi
Add a comment to locate more formal-correctness data cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns-rpc.cgi

    r666 r671  
    211211    $zoneid = $dnsdb->domainID($args{zone}) if $args{revrec} eq 'n';
    212212    $zoneid = $dnsdb->revID($args{zone}) if $args{revrec} eq 'y';
    213     die "Can't find zone: $dnsdb->errstr\n" if !$zoneid;
     213    die "Can't find zone: ".$dnsdb->errstr."\n" if !$zoneid;
    214214    ($code,$msg) = $dnsdb->delZone($zoneid, $args{revrec});
    215215  }
     
    227227
    228228  my $domid = $dnsdb->domainID($args{domain});
    229   die "$dnsdb->errstr\n" if !$domid;
     229  die $dnsdb->errstr."\n" if !$domid;
    230230  return $domid;
    231231}
     
    397397  my $ret = $dnsdb->getRecLine($args{defrec}, $args{revrec}, $args{id});
    398398
    399   die "$dnsdb->errstr\n" if !$ret;
     399  die $dnsdb->errstr."\n" if !$ret;
    400400
    401401  return $ret;
     
    430430
    431431  # fail if we *still* don't have a valid zone ID
    432   die "$dnsdb->errstr\n" if !$args{id};
     432  die $dnsdb->errstr."\n" if !$args{id};
    433433
    434434  # and finally retrieve the records.
     
    436436        offset => $args{offset}, nrecs => $args{nrecs}, sortby => $args{sortby},
    437437        sortorder => $args{sortorder}, filter => $args{filter});
    438   die "$dnsdb->errstr\n" if !$ret;
     438  die $dnsdb->errstr."\n" if !$ret;
    439439
    440440  return $ret;
     
    458458        id => $args{id}, filter => $args{filter});
    459459
    460   die "$dnsdb->errstr\n" if !$ret;
     460  die $dnsdb->errstr."\n" if !$ret;
    461461
    462462  return $ret;
     
    543543      my $reclist = $dnsdb->getRecList(defrec => 'n', revrec => 'y',
    544544        id => $zonelist->[0]->{rdns_id}, filter => $filt);
     545##fixme: Figure some new magic to automerge new incoming A(AAA)+PTR requests
     546# with existing A records to prevent duplication of A(AAA) records
    545547      if (scalar(@$reclist) == 0) {
    546548        # Aren't Magic Numbers Fun?  See pseudotype list in dnsadmin.
     
    667669          } else {
    668670            my $ret = $dnsdb->downconvert($rec->{record_id}, $DNSDB::reverse_typemap{A});
    669             die "$dnsdb->errstr\n" if !$ret;
     671            die $dnsdb->errstr."\n" if !$ret;
    670672            return "A+PTR for $args{cidr} split and PTR removed";
    671673          }
Note: See TracChangeset for help on using the changeset viewer.