From 3a975cc50b24798726adab18cf9d57bf4c2c530a Mon Sep 17 00:00:00 2001
From: minima <minima>
Date: Sat, 9 Jun 2001 04:41:48 +0000
Subject: [PATCH] make sure the version no is updated correctly

---
 perl/DXProt.pm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/perl/DXProt.pm b/perl/DXProt.pm
index a1f909e7..3f4575aa 100644
--- a/perl/DXProt.pm
+++ b/perl/DXProt.pm
@@ -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)
-- 
2.43.0