From: minima Date: Mon, 22 Jan 2007 23:15:59 +0000 (+0000) Subject: more pc41 hardening X-Git-Tag: 1.54~12 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4574b01fef9163f02bdce1ae45485c02338774bb;p=spider.git more pc41 hardening --- diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index 641299d3..d8e9f2f7 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -1159,9 +1159,9 @@ sub handle_41 } elsif ($_[2] == 3) { if (is_latlong($_[3])) { my ($lat, $long) = DXBearing::stoll($_[3]); - $user->lat($lat); - $user->long($long); - $user->qra(DXBearing::lltoqra($lat, $long)); + $user->lat($lat) if $lat; + $user->long($long) if $long; + $user->qra(DXBearing::lltoqra($lat, $long)) unless $user->qra; } else { dbg('PCPROT: not a valid lat/long') if isdbg('chanerr'); return; @@ -1171,8 +1171,8 @@ sub handle_41 } elsif ($_[2] == 5) { if (is_qra(uc $_[3])) { my ($lat, $long) = DXBearing::qratoll(uc $_[3]); - $user->lat($lat); - $user->long($long); + $user->lat($lat) if $lat && !$user->lat; + $user->long($long) if $long && !$user->long; $user->qra(uc $_[3]); } else { dbg('PCPROT: not a valid QRA locator') if isdbg('chanerr');