+ if ($main::systime >= $lastmin + 60) {
+ if ($lastmin) {
+ per_minute();
+ $lastmin = $main::systime;
+ }
+ }
+}
+
+sub per_minute
+{
+ # send hello and cf packages periodically
+ foreach my $dxchan (DXChannel::get_all()) {
+ next if $dxchan == $main::me;
+ next if $dxchan->is_aranea;
+ if ($main::systime > $dxchan->lasthello + $hello_interval) {
+ my $thing = Thingy::Hello->new(user => $dxchan->call, h => $dxchan->here);
+ $thing->broadcast($dxchan);
+ $dxchan->lasthello($main::systime);
+ }
+ if ($dxchan->is_node) {
+ if ($main::systime > $dxchan->lasthello + $hello_interval) {
+ my $call = $dxchan->call;
+ my $thing = Thingy::Rt->new(user => $call);
+ if (my $nref = Route::Node::get($call)) {
+ $thing->copy_pc16_data($nref);
+ $thing->broadcast($dxchan);
+ $dxchan->lastcf($main::systime);
+ } else {
+ dbg("Aranea::per_minute: Route::Node for $call disappeared");
+ $dxchan->disconnect;
+ }
+ }
+ }
+ }