fix missing IP addresses on spots and PC92 A records
authorDirk Koopman <djk@tobit.co.uk>
Wed, 18 Jan 2023 15:45:09 +0000 (15:45 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 18 Jan 2023 15:45:09 +0000 (15:45 +0000)
Changes
perl/DXChannel.pm
perl/RBN.pm

diff --git a/Changes b/Changes
index a0785510da5310c96e7251f3a04f77854e0bbbf3..44fe04abba23ec6a248bbbd7399adc6cdab48cd1 100644 (file)
--- 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=======================================================================
index 8b1792cd148dc0caddb6f5180ef1907d149c7d05..56b96faa126d91d1b3256d7bba8944dfc453402b 100644 (file)
@@ -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; 
index e0d096b9dcd6ecf389ed349c3a0b4362cb6ac084..e844b6d6bcba0c5597a948b2c5fc765520cd45d2 100644 (file)
@@ -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