]> git.proxmox.com Git - pmg-api.git/commitdiff
PMG/Service/pmgtunnel.pm: avoid use of $cinfo->{remnodes}
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Apr 2017 14:49:49 +0000 (16:49 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Apr 2017 14:49:49 +0000 (16:49 +0200)
PMG/Service/pmgtunnel.pm
bin/pmgtunnel

index 6ca534b0ddf7462377b9a80f5901de0b487d6a87..15390746404a9f03442ae3d38ce472782a00671a 100644 (file)
@@ -53,9 +53,8 @@ sub start_tunnels {
     my $role = $cinfo->{local}->{type} // '-';
     return if $role eq '-';
 
-    foreach my $cid (@{$cinfo->{remnodes}}) {
+    foreach my $cid (keys %{$cinfo->{ids}}) {
        my $ni = $cinfo->{ids}->{$cid};
-       next if !$ni; # just to be sure
        next if $ni->{ip} eq $cinfo->{local}->{ip}; # just to be sure
 
        my $dbport = $cinfo->{dbport}->{$cid};
index 4e0a29786f6e8707d102700d12a86806cd41a54d..cc3188f21a73192dd676b1deab9c55f8d740799d 100755 (executable)
@@ -2,7 +2,7 @@
 
 $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
 
-delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};  
+delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
 
 use strict;
 use warnings;