X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FAranea.pm;h=c04534b73bacf2d2cdb2ea38a1b282275834fee8;hb=a597f3d1e4533abebfd844d365f2d4cb62ba33e6;hp=475fdd05d12f71c1527c9477fb6d2e1393549ad5;hpb=6d518a0ec42a570b512cccc2ca33b86c843c0816;p=spider.git diff --git a/perl/Aranea.pm b/perl/Aranea.pm index 475fdd05..c04534b7 100644 --- a/perl/Aranea.pm +++ b/perl/Aranea.pm @@ -126,7 +126,7 @@ sub start unless ($self->{outbound}) { my $thing = Thingy::Rt->new_cf; $thing->broadcast; - $self->lastcf($main::systime); + $main::me->lastcf($main::systime); } # run a script send the output to the debug file @@ -186,15 +186,25 @@ sub per_minute if ($dxchan->is_node) { if ($main::systime >= $dxchan->lastcf + $cf_interval) { my $call = $dxchan->call; - my $thing = Thingy::Rt->new(); - $thing->{user} = $call unless $dxchan == $main::me; - if (my $nref = Route::Node::get($call)) { - $thing->copy_pc16_data($nref); - $thing->broadcast($dxchan); - $dxchan->lastcf($main::systime); + if ($dxchan == $main::me) { + + # i am special but, currently, still a node + my $thing = Thingy::Rt->new_cf; + $thing->broadcast; + $self->lastcf($main::systime); } else { - dbg("Aranea::per_minute: Route::Node for $call disappeared"); - $dxchan->disconnect; + + # i am a pc protocol node connected directly + my $thing = Thingy::Rt->new(); + $thing->{user} = $call unless $dxchan == $main::me; + 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; + } } } }