Changeset 256 for trunk


Ignore:
Timestamp:
05/31/05 14:24:33 (19 years ago)
Author:
Kris Deugau
Message:

/trunk

Merge bugfixes from /branches/stable r248:252.

Location:
trunk/cgi-bin
Files:
3 edited

Legend:

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

    r246 r256  
    384384      }; # end eval
    385385      if ($@) {
     386        $msg .= ": ".$@;
    386387        eval { $dbh->rollback; };
    387388        return ('FAIL',$msg);
  • trunk/cgi-bin/admin.cgi

    r233 r256  
    125125    printAndExit("Can't allocate from outside a free block!!\n")
    126126        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];
    127134  } else {
    128135    $sth = $ip_dbh->prepare("select cidr from freeblocks where cidr >>='$cidr' and not (routed='n')");
     
    204211      print "Allocation failed!  IPDB::allocateBlock said:\n$msg\n";
    205212      syslog "err", "($authuser) Allocation of '$webvar{cidr}' to '$webvar{custid}' as ".
    206         "'$webvar{type}' failed: '$msg'";
     213        "'$webvar{alloctype}' failed: '$msg'";
    207214    }
    208215  } # done city check
     
    326333  print qq(<hr><a href="admin.cgi?action=showACL">Back</a> to ACL listing\n);
    327334
    328 } else {
     335} elsif ($webvar{action} ne '<NULL>') {
    329336  print "webvar{action} check failed: Don't know how to $webvar{action}";
    330337}
  • trunk/cgi-bin/main.cgi

    r255 r256  
    838838    }
    839839    syslog "notice", "$authuser allocated '$webvar{fullcidr}' to '$webvar{custid}' as ".
    840         "'$webvar{alloctype}'";
     840        "'$webvar{alloctype}' ($msg)";
    841841  } else {
    842842    syslog "err", "Allocation of '$webvar{fullcidr}' to '$webvar{custid}' as ".
Note: See TracChangeset for help on using the changeset viewer.