# 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);
}
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');
# 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;
}
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;