mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
add more fixes for peerhosts
This commit is contained in:
parent
7c7080ad70
commit
c02dc2d8b5
1
Changes
1
Changes
@ -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
|
||||
|
@ -412,7 +412,7 @@ sub _find
|
||||
sub peerhost
|
||||
{
|
||||
my $conn = shift;
|
||||
$conn->{peerhost} ||= $conn->{agwcall} || "UNKNOWN";
|
||||
$conn->{peerhost} ||= 'ax25';
|
||||
return $conn->{peerhost};
|
||||
}
|
||||
|
||||
|
@ -134,6 +134,13 @@ sub active
|
||||
return $Buffers;
|
||||
}
|
||||
|
||||
sub peerhost
|
||||
{
|
||||
my $conn = shift;
|
||||
$conn->{peerhost} ||= 'ax25';
|
||||
return $conn->{peerhost};
|
||||
}
|
||||
|
||||
|
||||
sub connect
|
||||
{
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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};
|
||||
}
|
||||
|
17
perl/Msg.pm
17
perl/Msg.pm
@ -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};
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
@ -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) = @_;
|
||||
|
@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
|
||||
|
||||
$version = '1.55';
|
||||
$subversion = '0';
|
||||
$build = '63';
|
||||
$build = '64';
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user