Skip to content

Commit

Permalink
[backend] fix dclone call, it cannot clone non-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe authored and adrianschroeter committed Oct 21, 2013
1 parent 3984cb4 commit a810464
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/bs_dispatch
Expand Up @@ -291,7 +291,8 @@ sub mergeconstraints {
}
if ($con2->{'hardware'}) {
for my $el (qw{processors disk memory physicalmemory}) {
$con->{'hardware'}->{$el} = Storable::dclone($con2->{'hardware'}->{$el}) if defined $con2->{'hardware'}->{$el};
next unless defined $con2->{'hardware'}->{$el};
$con->{'hardware'}->{$el} = ref($con2->{'hardware'}->{$el}) ? Storable::dclone($con2->{'hardware'}->{$el}) : $con2->{'hardware'}->{$el};
}
if ($con2->{'hardware'}->{'cpu'} && $con2->{'hardware'}->{'cpu'}->{'flag'}) {
my %oldflags = map {$_ => 1} @{$con->{'hardware'}->{'cpu'}->{'flag'} || []};
Expand Down

0 comments on commit a810464

Please sign in to comment.