X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FExtMsg.pm;h=6b2cce7d5059aea87f97a3af8d70632378aaf4da;hb=450f32dc7ea97f6bf32c96eb74e1fa48660b07f3;hp=ae50f036568c57a02596f1d70b40c38260289876;hpb=cf757a24d80e093d2da598c76bbe3f59fde26902;p=spider.git diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index ae50f036..6b2cce7d 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -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') { @@ -106,7 +106,7 @@ sub dequeue my $sort = $conn->{csort}; $sort = 'local' if $conn->{peerhost} =~ /127\.\d+\.\d+\.\d+$/ || $conn->{peerhost} eq '::1'; my $uref; - if ($main::passwdreq || ($uref = DXUser->get_current($msg)) && $uref->passwd ) { + if ($main::passwdreq || ($uref = DXUser::get_current($msg)) && $uref->passwd ) { $conn->conns($msg); $conn->{state} = 'WP'; $conn->{decho} = $conn->{echo}; @@ -120,7 +120,7 @@ sub dequeue $conn->disconnect; } } elsif ($conn->{state} eq 'WP' ) { - my $uref = DXUser->get_current($conn->{call}); + my $uref = DXUser::get_current($conn->{call}); $msg =~ s/[\r\n]+$//; if ($uref && $msg eq $uref->passwd) { my $sort = $conn->{csort}; @@ -153,7 +153,11 @@ 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->{csort} = $sort; + unless ($conn->ax25) { + eval {$conn->{peerhost} = $conn->{sock}->peerhost}; + $conn->nolinger; + } &{$conn->{rproc}}($conn, "$dir$call|$sort"); $conn->_send_file("$main::data/connected") unless $conn->{outgoing}; }