]> dxcluster.org Git - spider.git/commitdiff
more pc41 hardening
authorminima <minima>
Mon, 22 Jan 2007 23:15:59 +0000 (23:15 +0000)
committerminima <minima>
Mon, 22 Jan 2007 23:15:59 +0000 (23:15 +0000)
perl/DXProtHandle.pm

index 641299d36c5b126f2abf40f7769b9c27b81c9e3d..d8e9f2f78e8f341ebfe3525e004b56b0ac347cc9 100644 (file)
@@ -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');