fix non-existant id on pc prot pings
authorminima <minima>
Mon, 7 Mar 2005 23:34:01 +0000 (23:34 +0000)
committerminima <minima>
Mon, 7 Mar 2005 23:34:01 +0000 (23:34 +0000)
perl/Thingy/Ping.pm

index ce64181231f146401fae09827efda789ca789c87..14c4ea6a2ff045b34f105786dc449f0672d9b23f 100644 (file)
@@ -98,7 +98,8 @@ sub handle
                } else {
 
                        # it's a reply, look in the ping list for this one
-                       my $ref = $ping{$thing->{id}} || $thing->find;
+                       my $ref = $ping{$thing->{id}} if $thing->{id}
+                       $ref ||= $thing->find;
                        if ($ref) {
                                my $t = tv_interval($thing->{t}, [ gettimeofday ]);
                                if (my $dxc = DXChannel::get($thing->{user} || $thing->{origin})) {