]> dxcluster.net Git - spider.git/commitdiff
fix cf broadcasts
authorminima <minima>
Thu, 24 Feb 2005 18:47:24 +0000 (18:47 +0000)
committerminima <minima>
Thu, 24 Feb 2005 18:47:24 +0000 (18:47 +0000)
perl/Aranea.pm
perl/Route/Node.pm

index 475fdd05d12f71c1527c9477fb6d2e1393549ad5..c04534b73bacf2d2cdb2ea38a1b282275834fee8 100644 (file)
@@ -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;
+                                       }
                                }
                        }
                }
index bd69d3d77290947af5089a73484ebc339cddbfe1..92501266ee24957d88c8b33a503385e0e0ef6709 100644 (file)
@@ -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
 #