From: minima Date: Thu, 24 Feb 2005 18:47:24 +0000 (+0000) Subject: fix cf broadcasts X-Git-Tag: R_1_52~136 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a597f3d1e4533abebfd844d365f2d4cb62ba33e6;p=spider.git fix cf broadcasts --- 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; + } } } } diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index bd69d3d7..92501266 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -339,15 +339,6 @@ sub _deluser return $self->_dellist('users', @_); } -sub DESTROY -{ - my $self = shift; - my $pkg = ref $self; - my $call = $self->{call} || "Unknown"; - - dbg("destroying $pkg with $call") if isdbg('routelow'); -} - # # generic AUTOLOAD for accessors #