Commit 078ec98b authored by Kirk Webb's avatar Kirk Webb

Add new modules to makefile.

Also squash a couple of typos.
parent 05181e4b
......@@ -48,7 +48,8 @@ LIB_SCRIPTS = libdb.pm Node.pm libdb.py libadminctrl.pm Experiment.pm \
Image.pm OSinfo.pm Archive.pm Logfile.pm Lan.pm emdbi.pm \
emdb.pm emutil.pm Firewall.pm VirtExperiment.pm libGeni.pm \
libEmulab.pm EmulabConstants.pm TraceUse.pm \
EmulabFeatures.pm Port.pm BlockstoreType.pm Blockstore.pm
EmulabFeatures.pm Port.pm BlockstoreType.pm Blockstore.pm \
IPBuddyAlloc.pm IPBuddyWrapper.pm
# Stuff installed on plastic.
USERSBINS = genelists.proxy dumperrorlog.proxy backup
......
......@@ -54,21 +54,21 @@ use Socket;
# the type of address reservations to target.
#
sub new($$) {
my ($class, $type) = @_;
my ($class, $intype) = @_;
my $self = {};
return undef
unless defined($type);
unless defined($intype);
# Get the address range corresponding to this type from the database.
# Currently this only supports one type, and one range for that type.
my $qres =
DBQueryWarn("select * from address_ranges where type='$type'");
DBQueryWarn("select * from address_ranges where type='$intype'");
return undef
if (!$qres);
if ($qres->numrows() != 1) {
tberror("More than one range entry found for this address ".
"type in the DB: $type\n");
"type in the DB: $intype\n");
return undef;
}
......@@ -318,6 +318,7 @@ sub new($$$) {
$self->{'RANGE'} = $range;
$self->{'IPOBJ'} = $ipobj;
bless($self, $class);
return $self;
}
......@@ -344,7 +345,7 @@ sub getNextAddress($) {
# Reset back to base address from this object's range.
#
sub resetAddress($) {
my $self = $shift;
my $self = shift;
my $ipobj = Net::IP->new($self->getrange());
$self->{'IPOBJ'} = $ipobj;
......
......@@ -33,7 +33,7 @@ sub DoUpdate($$$)
" `type` varchar(30) NOT NULL default '', ".
" `role` enum('public','internal') ".
" NOT NULL default 'internal', ".
" PRIMARY KEY (`baseaddr`,`prefix`)"
" PRIMARY KEY (`baseaddr`,`prefix`)".
")");
}
......
......@@ -7764,10 +7764,10 @@ sub CheckIPAddressReservations($) {
$member->ip($new_ip);
my $sflags = 0;
$sflags |= $self->verbose() ?
VirtExperiment::STORE_FLAGS_DEBUG :
$VirtExperiment::STORE_FLAGS_DEBUG :
0;
$sflags |= $self->impotent() ?
VirtExperiment::STORE_FLAGS_IMPOTENT :
$VirtExperiment::STORE_FLAGS_IMPOTENT :
0;
if ($member->Store($sflags) != 0) {
$buddy->unlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment