From da115e307d67c9aa6756a7b3b1cfa7a6f70e2e0d Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 11 Mar 2005 21:25:17 +0000 Subject: [PATCH] try to fix protocol version --- perl/DXProt.pm | 8 +++----- perl/DXProtVars.pm | 2 +- perl/DXProtout.pm | 2 +- perl/cluster.pl | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 3001d6eb..cc468cd5 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -214,7 +214,6 @@ sub init my $user = DXUser->get($main::mycall); die "User $main::mycall not setup or disappeared RTFM" unless $user; - $myprot_version += $main::version*100; $main::me = DXProt->new($main::mycall, 0, $user); $main::me->{here} = 1; $main::me->{state} = "indifferent"; @@ -223,7 +222,7 @@ sub init $main::me->{metric} = 0; $main::me->{pingave} = 0; $main::me->{registered} = 1; - $main::me->{version} = 5252 + $main::version; + $main::me->{version} = $myprot_version + int ($main::version * 100); $main::me->{build} = $main::build; $main::me->{lastcf} = $main::me->{lasthello} = time; } @@ -1107,8 +1106,7 @@ sub handle_20 my $thing = Thingy::Rt->new(user=>$self->{call}); my $nref = Route::Node::get($self->{call}); $thing->copy_pc16_data($nref); - $thing->broadcast; - + $thing->broadcast($self); $self->lastcf($main::systime); } @@ -1199,7 +1197,7 @@ sub handle_22 my $thing = Thingy::Rt->new(user=>$self->{call}); my $nref = Route::Node::get($self->{call}); $thing->copy_pc16_data($nref); - $thing->broadcast; + $thing->broadcast($self); $self->lastcf($main::systime); } diff --git a/perl/DXProtVars.pm b/perl/DXProtVars.pm index 98fd201f..05f02bb7 100644 --- a/perl/DXProtVars.pm +++ b/perl/DXProtVars.pm @@ -15,7 +15,7 @@ package DXProt; $pc50_interval = 14*60; # the version of DX cluster (tm) software I am masquerading as -$myprot_version = 5251; +$myprot_version = 5252; # default hopcount to use $def_hopcount = 30; diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 508710d0..04eefe39 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -121,7 +121,7 @@ sub pc17 # Request init string sub pc18 { - my $v = $DXProt::myprot_version + $main::version; + my $v = $DXProt::myprot_version + int($main::version * 100); return "PC18^DXSpider Version: $main::version Build: $main::build^$v^"; } diff --git a/perl/cluster.pl b/perl/cluster.pl index 1f225b59..af1fe2e7 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -267,7 +267,7 @@ DXProt->init(); Aranea->init(); # put in a DXCluster node for us here so we can add users and take them away -$routeroot = Route::Node->new($mycall, $version*100+5252, $main::me->here); +$routeroot = Route::Node->new($mycall, int($version*100)+$DXProt::myprot_version, $main::me->here); # make sure that there is a routing OUTPUT node default file #unless (Filter::read_in('route', 'node_default', 0)) { -- 2.43.0