Commit 38e6c29a authored by fv3rdugo's avatar fv3rdugo
Browse files

fix(ports): check ports

Issue #1197
parent 5519acd6
......@@ -2509,10 +2509,21 @@ sub list_ports($self) {
." FROM domain_ports WHERE id_domain=?");
$sth->execute($self->id);
my @list;
my %clone_port;
while (my $data = $sth->fetchrow_hashref) {
lock_hash(%$data);
push @list,($data);
$clone_port{$data->{internal_port}}++;
}
if ($self->id_base) {
my $base = Ravada::Domain->open($self->id_base);
my @ports_base = $base->list_ports();
for my $data (@ports_base) {
push @list,($data) if !exists $clone_port{$data->{internal_port}};
}
}
return @list;
}
......
Supports Markdown
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