]> dxcluster.org Git - spider.git/commitdiff
make sure the version no is updated correctly
authorminima <minima>
Sat, 9 Jun 2001 04:41:48 +0000 (04:41 +0000)
committerminima <minima>
Sat, 9 Jun 2001 04:41:48 +0000 (04:41 +0000)
perl/DXProt.pm

index a1f909e752511fec43e175726d37a3afa8121b87..3f4575aa3907ca18ac361c364d5978eaff05a2e9 100644 (file)
@@ -195,7 +195,7 @@ sub new
        # add this node to the table, the values get filled in later
        my $pkg = shift;
        my $call = shift;
-       $main::routeroot->add($call) if $call ne $main::mycall;
+       $main::routeroot->add($call, '0000', Route::here(1)) if $call ne $main::mycall;
 
        return $self;
 }
@@ -634,6 +634,7 @@ sub normal
                                next if length $call < 3; # min 3 letter callsigns
 
                                # update it if required
+                               my $r;
                                if ($parent->call eq $call && !$parent->version) {
                                        $parent->version($ver);
                                        $parent->flags(Route::here($here)|Route::conf($conf));
@@ -643,6 +644,13 @@ sub normal
 
                                        my $r = $parent->add($call, $ver, Route::here($here)|Route::conf($conf));
                                        push @rout, $r if $r;
+                               } else {
+                                       $r = Route::Node::get($call);
+                                       if ($r && (!$r->version || $r->version eq '0000')) {
+                                               $r->version($ver);
+                                               $r->flags(Route::here($here)|Route::conf($conf));
+                                               push @rout, $r;
+                                       }
                                }
 
                                # unbusy and stop and outgoing mail (ie if somehow we receive another PC19 without a disconnect)