added broadcast_all_ak1a so that local commands go to isolated clusters
[spider.git] / perl / DXProt.pm
index fbc63bc09ed2df2a5c2304ecf627ca86a0851be7..7dc55189d6d4b349eccfb9dc1b8653a8952605c4 100644 (file)
@@ -773,7 +773,8 @@ sub route
        }
 }
 
-# broadcast a message to all clusters [except those mentioned after buffer]
+# broadcast a message to all clusters taking into account isolation
+# [except those mentioned after buffer]
 sub broadcast_ak1a
 {
        my $s = shift;                          # the line to be rebroadcast
@@ -789,6 +790,23 @@ sub broadcast_ak1a
        }
 }
 
+# broadcast a message to all clusters ignoring isolation
+# [except those mentioned after buffer]
+sub broadcast_all_ak1a
+{
+       my $s = shift;                          # the line to be rebroadcast
+       my @except = @_;                        # to all channels EXCEPT these (dxchannel refs)
+       my @dxchan = get_all_ak1a();
+       my $dxchan;
+       
+       # send it if it isn't the except list and isn't isolated and still has a hop count
+       foreach $dxchan (@dxchan) {
+               next if grep $dxchan == $_, @except;
+               my $routeit = adjust_hops($dxchan, $s);      # adjust its hop count by node name
+               $dxchan->send($routeit);
+       }
+}
+
 # broadcast to all users
 # storing the spot or whatever until it is in a state to receive it
 sub broadcast_users