From 3c772f881b05406e916a1bf959aa1266c7e216b9 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 14 Feb 2005 17:52:50 +0000 Subject: [PATCH] change the Hello to use default values change the ROUTE to RT group --- perl/AMsg.pm | 4 ++-- perl/Aranea.pm | 2 +- perl/Thingy/Hello.pm | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/perl/AMsg.pm b/perl/AMsg.pm index 6a178322..f1a7112f 100644 --- a/perl/AMsg.pm +++ b/perl/AMsg.pm @@ -71,7 +71,7 @@ sub dequeue # this is the first stage that we have a callsign # do we have a hello? $msg =~ s/[\r\n]+$//; - if ($msg =~ m{ROUTE,[0-9A-F,]+|HELLO}) { + if ($msg =~ m{RT,[0-9A-F,]+|HELLO}) { # a possibly valid HELLO line, process it $conn->new_channel($msg); } @@ -127,7 +127,7 @@ sub new_client { Log('Aranea', "Incoming connection from $conn->{peerhost}"); $conn->{outbound} = 0; $conn->{state} = 'WH'; # wait for return authorize - my $thing = $conn->{lastthing} = Thingy::Hello->new(origin=>$main::mycall, group=>'ROUTE'); + my $thing = $conn->{lastthing} = Thingy::Hello->new(); $thing->send($conn, 'Aranea'); dbg("-> D $conn->{peerhost} $thing->{Aranea}") if isdbg('chan'); diff --git a/perl/Aranea.pm b/perl/Aranea.pm index 3af3aee9..f3d07eaf 100644 --- a/perl/Aranea.pm +++ b/perl/Aranea.pm @@ -55,7 +55,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, '5000', Route::here(1)) if $call ne $main::mycall; + $main::routeroot->add($call, '5251', Route::here(1)) if $call ne $main::mycall; $self->{'sort'} = 'W'; return $self; } diff --git a/perl/Thingy/Hello.pm b/perl/Thingy/Hello.pm index f2d2d5d1..c991a901 100644 --- a/perl/Thingy/Hello.pm +++ b/perl/Thingy/Hello.pm @@ -67,11 +67,18 @@ sub handle if ($dxchan->{state} ne 'normal') { $dxchan->start($dxchan->{conn}->{csort}, $dxchan->{conn}->{outbound} ? 'O' : 'A'); if ($dxchan->{outbound}) { - my $thing = Thingy::Hello->new(origin=>$main::mycall, group=>'ROUTE'); + my $thing = Thingy::Hello->new(); $thing->send($dxchan); } } } $thing->broadcast($dxchan); } + +sub new +{ + my $pkg = shift; + my $thing = $pkg->SUPER::new(origin=>$main::mycall, group=>'RT'); + return $thing; +} 1; -- 2.43.0