Changeset 189 for trunk/cgi-bin/IPDB.pm


Ignore:
Timestamp:
03/08/05 17:37:46 (19 years ago)
Author:
Kris Deugau
Message:

/trunk

Caught some buglets in the HairyPerl(TM) ('$1' vs "$1")
Corrected a potentially annoying SQL buglet relating to the

selection of which netblock an allocation is to be taken from;
under certain conditions it would pick a larger block to slice
up while there was still a perfectly usable block just the
right size waiting to be allocated.

Removed display of back-end alloctypes from success/failure notes
Corrected comments referring to alloctypes that have been altered
Updated IPDB "default" schema and alloctypes list with current

base information

File:
1 edited

Legend:

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

    r187 r189  
    332332          $sth->execute;
    333333
    334         } else { # done with alloctype == rr
     334        } else { # done with alloctype == rm
    335335
    336336          # Insert the new freeblocks entries
     
    339339          $sth = $dbh->prepare("insert into freeblocks (cidr,maskbits,city,routed)".
    340340                " values (?, ?, (select city from routed where cidr >>= '$cidr'),'".
    341                 (($type =~ /^(.)r$/) ? '$1' : 'y')."')");
     341                (($type =~ /^(.)r$/) ? "$1" : 'y')."')");
    342342          foreach my $block (@newfreeblocks) {
    343343            $sth->execute("$block", $block->masklen);
     
    370370          }
    371371
    372         } # done with netblock alloctype != rr
     372        } # done with netblock alloctype != rm
    373373
    374374        $dbh->commit;
     
    577577                " values ('$cidr',".$cidr->masklen.
    578578                ",(select city from routed where cidr >>= '$cidr'),'".
    579                 (($type =~ /^(.)r$/) ? '$1' : 'y')."')");
     579                (($type =~ /^(.)r$/) ? "$1" : 'y')."')");
    580580      }
    581581      $sth->execute;
Note: See TracChangeset for help on using the changeset viewer.