X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FMsg.pm;h=ad09c85da0f784d98b12634f01ad1a0e421144d5;hb=f2c90f82509ae2be33216ebaed3bc9f8ea3f5f80;hp=df4edd3606f0d90ae1faaf3bf07415e2ed50d558;hpb=f6fd9522ef2db78203d2de675d46ec8f722eb071;p=spider.git diff --git a/perl/Msg.pm b/perl/Msg.pm index df4edd36..ad09c85d 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -120,9 +120,11 @@ sub ax25 sub peerhost { my $conn = shift; - $conn->{peerhost} ||= 'ax25' if $conn->ax25; - $conn->{peerhost} ||= $conn->{sock}->handle->peerhost if $conn->{sock}; - $conn->{peerhost} ||= 'UNKNOWN'; + unless ($conn->{peerhost}) { + $conn->{peerhost} ||= 'ax25' if $conn->ax25; + $conn->{peerhost} ||= $conn->{sock}->handle->peerhost if $conn->{sock}; + $conn->{peerhost} ||= 'UNKNOWN'; + } return $conn->{peerhost}; }