- Timestamp:
- 09/23/10 00:51:55 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r462 r485 576 576 # have to insert all pool IPs into poolips table as "unallocated". 577 577 $sth = $dbh->prepare("insert into poolips (pool,ip,custid,city,type)". 578 " values ('$pool', ?, '$defcustid', '$city', '$type')");578 " values ('$pool', ?, '$defcustid', ?, '$type')"); 579 579 my @poolip_list = $pool->hostenum; 580 580 if ($class eq 'all') { # (DSL-ish block - *all* IPs available 581 581 if ($pool->addr !~ /\.0$/) { # .0 causes weirdness. 582 $sth->execute($pool->addr );582 $sth->execute($pool->addr, $city); 583 583 } 584 584 for (my $i=0; $i<=$#poolip_list; $i++) { 585 $sth->execute($poolip_list[$i]->addr );585 $sth->execute($poolip_list[$i]->addr, $city); 586 586 } 587 587 $pool--; 588 588 if ($pool->addr !~ /\.255$/) { # .255 can cause weirdness. 589 $sth->execute($pool->addr );589 $sth->execute($pool->addr, $city); 590 590 } 591 591 } else { # (real netblock) 592 592 for (my $i=1; $i<=$#poolip_list; $i++) { 593 $sth->execute($poolip_list[$i]->addr );593 $sth->execute($poolip_list[$i]->addr, $city); 594 594 } 595 595 } 596 596 }; 597 597 if ($@) { 598 $msg = "'".$sth->errstr."'";598 $msg = $@." '".$sth->errstr."'"; 599 599 eval { $dbh->rollback; }; 600 600 return ('FAIL',$msg);
Note:
See TracChangeset
for help on using the changeset viewer.