add more fixes for peerhosts

This commit is contained in:
Dirk Koopman 2010-03-13 19:41:54 +00:00
parent 7c7080ad70
commit c02dc2d8b5
9 changed files with 32 additions and 12 deletions

View File

@ -1,5 +1,6 @@
13Mar10=======================================================================
1. try to fix AGW crashes caused by peerhost looking at the wrong thing.
2. Add more ax25 fixes for peerhost
03Mar10=======================================================================
1. add IP addresses to connecting PC92 A addresses and log them
2. add CTY-2002 prefixes

View File

@ -412,7 +412,7 @@ sub _find
sub peerhost
{
my $conn = shift;
$conn->{peerhost} ||= $conn->{agwcall} || "UNKNOWN";
$conn->{peerhost} ||= 'ax25';
return $conn->{peerhost};
}

View File

@ -134,6 +134,13 @@ sub active
return $Buffers;
}
sub peerhost
{
my $conn = shift;
$conn->{peerhost} ||= 'ax25';
return $conn->{peerhost};
}
sub connect
{

View File

@ -1224,7 +1224,7 @@ sub send_motd
}
$motd = "${main::motd}_$self->{lang}" unless $motd && -e $motd;
$motd = $main::motd unless $motd && -e $motd;
if ($self->conn->{csort} eq 'ax25') {
if ($self->conn->ax25) {
if ($motd) {
$motd = "${motd}_ax25" if -e "${motd}_ax25";
} else {

View File

@ -45,7 +45,7 @@ sub dequeue
my $conn = shift;
my $msg;
if ($conn->{csort} eq 'ax25' && exists $conn->{msg}) {
if ($conn->ax25 && exists $conn->{msg}) {
$conn->{msg} =~ s/\cM/\cJ/g;
}

View File

@ -72,7 +72,7 @@ sub dequeue
my $conn = shift;
my $msg;
if ($conn->{csort} eq 'ax25' && exists $conn->{msg}) {
if ($conn->ax25 && exists $conn->{msg}) {
$conn->{msg} =~ s/\cM/\cJ/g;
}
if ($conn->{state} eq 'WC') {
@ -153,7 +153,7 @@ sub to_connected
delete $conn->{cmd};
$conn->{timeout}->del if $conn->{timeout};
delete $conn->{timeout};
$conn->nolinger unless $conn->isa('AGWMsg') || $conn->isa('BPQMsg');
$conn->nolinger unless $conn->ax25;
&{$conn->{rproc}}($conn, "$dir$call|$sort");
$conn->_send_file("$main::data/connected") unless $conn->{outgoing};
}

View File

@ -193,14 +193,19 @@ sub pid_gone
}
}
sub ax25
{
my $conn = shift;
return $conn->{csort} eq 'ax25';
}
sub peerhost
{
my $self = shift;
my $ip;
unless ($self->{peerhost}) {
$self->{peerhost} = $self->{sock}->peerhost;
}
return $self->{peerhost};
my $conn = shift;
$conn->{peerhost} ||= 'ax25' if $conn->ax25;
$conn->{peerhost} ||= $conn->{sock}->peerhost if $conn->{sock} && $conn->{sock}->isa('IO::Socket::INET');
$conn->{peerhost} ||= 'UNKNOWN';
return $conn->{peerhost};
}
#-----------------------------------------------------------------

View File

@ -201,6 +201,13 @@ sub _find
return $circuit{$call};
}
sub peerhost
{
my $conn = shift;
$conn->{peerhost} ||= 'ax25';
return $conn->{peerhost};
}
sub connect
{
my ($conn, $line) = @_;

View File

@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
$version = '1.55';
$subversion = '0';
$build = '63';
$build = '64';
1;