Commit 4cdb4c7f authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents a8231a6a b9e840fc
......@@ -4392,8 +4392,6 @@ sub ReserveSharedBandwidth($;$$)
# This is how much we need to release.
#
if ($isupdate && defined($previous_result)) {
$previous_result = $previous_result->WrapForSeek();
while (my ($node_id,$unit,$iface,$bw) =
$previous_result->fetchrow_array()) {
......
......@@ -167,8 +167,18 @@ sub Lookup($$)
return undef
if (!$query_result || !$query_result->numrows);
#
# Make a copy of the array. Still fighting memory corruption error.
#
my $hash_orig = $query_result->fetchrow_hashref();
my $hash_copy = {};
foreach my $key (keys(%{ $hash_orig })) {
my $val = $hash_orig->{$key};
$hash_copy->{$key} = $val;
}
my $self = {};
$self->{"DBROW"} = $query_result->fetchrow_hashref();
$self->{"DBROW"} = $hash_copy;
$self->{"RSRV"} = undef;
$self->{"TYPEINFO"} = undef;
$self->{"ATTRS"} = undef;
......
......@@ -5,7 +5,6 @@
# All rights reserved.
#
use English;
use libtbdb;
#
# usage: dumperrorlog.proxy
......@@ -44,6 +43,7 @@ $| = 1;
# Load the Testbed support stuff.
use lib "@prefix@/lib";
use libtestbed;
use libtbdb;
sub fatal($) {
my ($msg) = @_;
......
......@@ -299,7 +299,7 @@ sub DBQuoteSpecial($;$)
if (!defined($handle)) {
$dbhandle = $DB;
} else {
$dbhandle = $dbhandle->{'DB'};
$dbhandle = $handle->{'DB'};
}
$string = $dbhandle->quote($string);
......@@ -320,7 +320,7 @@ sub DBDateTime(;$)
$seconds = 0;
}
return strftime("20%y-%m-%d %H:%M:%S", localtime(time() + $seconds));
return strftime("20%y-%m-%d %H:%M:%S", localtime(time() + $seconds));
}
# Binary mode for database query
......@@ -336,7 +336,7 @@ sub DBDateTime(;$)
sub DBBinaryQuery {
my ($handle, $statement, @data) = @_;
my $dbh = $handle->{'DB'}->{'dbh'};
my $dbh = $handle->{'DB'};
my $sth = $dbh->prepare($statement);
if (!$sth) {
$DBErrorString =
......
......@@ -123,8 +123,8 @@ sub Map($)
"Could not merge advertisements" )
unless $result == 0;
}
# It is not a reference and it must be a single file that was passed
elsif (!ref($ad)) {
# It is not an array and it must be a single file that was passed
else {
# If the ad is Binary typed (and therefore base64 encoded), assume
# it is compressed.
if( Scalar::Util::blessed( $ad )
......
......@@ -20,7 +20,7 @@ sub usage()
exit(-1);
}
my $optlist = "dnp:e:o:";
my $debug = 1;
my $debug = 0;
my $dlevel = 1;
my $impotent = 0;
my $exitval = 0;
......
......@@ -1539,7 +1539,8 @@ sub doRestorePortStatus($@) {
print "Could not yank $port from $source_vlan\n";
$errors++;
}
VLan->RecordVLanModification($source_vlan->id(), undef, $port);
my @tmp = ($port);
VLan->RecordVLanModification($source_vlan->id(), undef, \@tmp);
}
if (defined($target_vlan) && $target_vlan->KeepInSync()) {
if ($target_vlan->AddPort($port)) {
......
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