squash some warnings
[spider.git] / perl / DXProtHandle.pm
index 5193a227043bb3d1a4a28430560ebf2a415f81c0..cd6a7518348d007968a25cea940334d27db2dfee 100644 (file)
@@ -224,9 +224,11 @@ sub handle_11
        # add it
        Spot::add(@spot);
 
-       my $ip = $spot[14] if exists $spot[14];
+       my $ip = '';
+       $ip ||= $spot[14] if exists $spot[14];
        if (isdbg('progress')) {
                my $sip = $ip ? sprintf "($ip)" : '' unless $ip =~ m|[\(\)\*]|;
+               $sip ||= '';
                my $d = ztime($spot[2]);
                my $s = "SPOT: $spot[1] on $spot[0] \@ $d by $spot[4]$sip\@$spot[7]";
                $s .= " '$spot[3]'" if $spot[3];
@@ -1480,7 +1482,7 @@ sub _add_thingy
        my @rout;
 
        # remove spurious IPV6 prefix on IPV4 addresses
-       $ip =~ s/^::ffff://;
+       $ip =~ s/^::ffff:// if $ip;
        
        if ($call) {
                my $ncall = $parent->call;