Changeset 758 for trunk/cgi-bin


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

/trunk

Refine calls to getBlockData() in allocateBlock() and updateBlock() for
proper sourcing and handling of rDNS-is-available flags. See #1, #41.

File:
1 edited

Legend:

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

    r757 r758  
    14511451    } else {
    14521452      # Snag the pool info
    1453       my $pinfo = getBlockData($args{parent});
     1453      my $pinfo = getBlockData($dbh, $args{parent});
    14541454      # Only try to update rDNS when the pool is flagged as "rDNS available"
    1455       if ($binfo->{revavail} || $binfo->{revpartial}) {
     1455      if ($pinfo->{revavail} || $pinfo->{revpartial}) {
    14561456        _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user});
    14571457      }
     
    15961596
    15971597    # Snag the parent info
    1598     my $pinfo = getBlockData($fbparent);
     1598    my $pinfo = getBlockData($dbh, $fbparent);
    15991599    # Only try to update rDNS when the pool is flagged as "rDNS available"
    1600     if ($binfo->{revavail} || $binfo->{revpartial}) {
     1600    if ($pinfo->{revavail} || $pinfo->{revpartial}) {
    16011601      # now we do the DNS dance for netblocks, if we have an RPC server to do it with and a pattern to use.
    16021602      _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user})
     
    18101810  # Do RPC rDNS call, if available.
    18111811  # Snag the parent info
    1812   my $pinfo = getBlockData($args{parent});
     1812  my $pinfo = getBlockData($dbh, $binfo->{parent_id});
    18131813  # Return early if rDNS flag(s) are not set
    18141814  return ('OK','OK') unless ($pinfo->{revavail} || $pinfo->{revpartial});
Note: See TracChangeset for help on using the changeset viewer.