Commit 843ee94b authored by Leigh Stoller's avatar Leigh Stoller

Minor fix to slice locking.

parent cea32f54
......@@ -191,7 +191,13 @@ sub Create($$$$;$$)
if (! DBQueryWarn("insert into geni_slices set " .
join(",", @insert_data)));
return GeniSlice->Lookup($idx);
my $slice = GeniSlice->Lookup($idx);
return undef
if (!defined($slice));
$slice->{'LOCKED'} = $$
if (defined($lock) && $lock);
return $slice;
}
# accessors
sub field($$) { return ((! ref($_[0])) ? -1 : $_[0]->{'SLICE'}->{$_[1]}); }
......
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