From: Dirk Koopman Date: Wed, 18 Jan 2023 15:45:09 +0000 (+0000) Subject: fix missing IP addresses on spots and PC92 A records X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca5baf12f22e041cb14af595254af4ae88d82ae0;p=spider.git fix missing IP addresses on spots and PC92 A records --- diff --git a/Changes b/Changes index a0785510..44fe04ab 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +18Jan23======================================================================= +1. Make sure than *every* channel has an IP address. Thank you (I think) Kin + for pointing out that PC92 A records were not going out with IP addresses. + I'm guessing that other things (like spots) had a similar problem. 15Jan23======================================================================= 1. Fix strange errors for carp on missing route_*_cache files on startup. 14Jan23======================================================================= diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 8b1792cd..56b96faa 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -185,6 +185,8 @@ sub alloc } $self->{inqueue} = []; + $self->{hostname} = $self->{conn}->peerhost if $conn; + $count++; dbg("DXChannel $self->{call} created ($count)") if isdbg('chan'); bless $self, $pkg; diff --git a/perl/RBN.pm b/perl/RBN.pm index e0d096b9..e844b6d6 100644 --- a/perl/RBN.pm +++ b/perl/RBN.pm @@ -172,9 +172,9 @@ sub start my $name = $user->{name}; # log it - my $host = $self->{conn}->peerhost; - $host ||= "unknown"; - $self->{hostname} = $host; + unless ($self->{hostname}) { + $self->{hostname} = $self->{conn}->peerhost || 'unknown'; + } $self->{name} = $name ? $name : $call; $self->state('prompt'); # a bit of room for further expansion, passwords etc