Changeset 256 for trunk/cgi-bin
- Timestamp:
- 05/31/05 14:24:33 (20 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r246 r256 384 384 }; # end eval 385 385 if ($@) { 386 $msg .= ": ".$@; 386 387 eval { $dbh->rollback; }; 387 388 return ('FAIL',$msg); -
trunk/cgi-bin/admin.cgi
r233 r256 125 125 printAndExit("Can't allocate from outside a free block!!\n") 126 126 if !$data[0]; 127 } elsif ($webvar{alloctype} =~ /^(.)i$/) { 128 $sth = $ip_dbh->prepare("select cidr from allocations where cidr >>='$cidr' and (type like '_d' or type like '_p')"); 129 $sth->execute; 130 @data = $sth->fetchrow_array; 131 # User deserves errors if user can't be bothered to find the pool and a free IP first. 132 printAndExit("Can't allocate static IP from outside a pool!!\n") 133 if !$data[0]; 127 134 } else { 128 135 $sth = $ip_dbh->prepare("select cidr from freeblocks where cidr >>='$cidr' and not (routed='n')"); … … 204 211 print "Allocation failed! IPDB::allocateBlock said:\n$msg\n"; 205 212 syslog "err", "($authuser) Allocation of '$webvar{cidr}' to '$webvar{custid}' as ". 206 "'$webvar{ type}' failed: '$msg'";213 "'$webvar{alloctype}' failed: '$msg'"; 207 214 } 208 215 } # done city check … … 326 333 print qq(<hr><a href="admin.cgi?action=showACL">Back</a> to ACL listing\n); 327 334 328 } els e{335 } elsif ($webvar{action} ne '<NULL>') { 329 336 print "webvar{action} check failed: Don't know how to $webvar{action}"; 330 337 } -
trunk/cgi-bin/main.cgi
r255 r256 838 838 } 839 839 syslog "notice", "$authuser allocated '$webvar{fullcidr}' to '$webvar{custid}' as ". 840 "'$webvar{alloctype}' ";840 "'$webvar{alloctype}' ($msg)"; 841 841 } else { 842 842 syslog "err", "Allocation of '$webvar{fullcidr}' to '$webvar{custid}' as ".
Note:
See TracChangeset
for help on using the changeset viewer.