Changeset 555 for trunk/cgi-bin


Ignore:
Timestamp:
11/20/12 17:58:48 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Work in progress, see #5:
Fix allocateBlock() update's "simple" case; don't delete things
before retriving details we need

File:
1 edited

Legend:

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

    r554 r555  
    732732        $msg = "Unable to allocate $args{cidr} as '$disp_alloctypes{$args{type}}'";
    733733
     734        # Get old freeblocks parent/depth/routed for new entries... before we delete it.
     735        my ($fparent) = $dbh->selectrow_array("SELECT parent FROM freeblocks WHERE cidr=? AND rdepth=?",
     736                undef, ($args{alloc_from}, $args{rdepth}) );
     737
    734738        # Munge freeblocks
    735739        if ($args{type} =~ /^(.)[mc]$/) {
     
    742746          $dbh->do("DELETE FROM freeblocks WHERE cidr=? AND rdepth=?", undef, ($args{cidr}, $args{rdepth}));
    743747        }
    744 
    745         # get old freeblocks parent/depth/routed for new entries
    746         my ($fparent) = $dbh->selectrow_array("SELECT parent,city,routed FROM freeblocks".
    747                 " WHERE cidr=? AND rdepth=?", undef, ($args{alloc_from}, $args{rdepth}));
    748748
    749749        # Insert the allocations entry
Note: See TracChangeset for help on using the changeset viewer.