get alternate pinging working properly at half pingint
authorminima <minima>
Tue, 24 Jan 2006 12:20:51 +0000 (12:20 +0000)
committerminima <minima>
Tue, 24 Jan 2006 12:20:51 +0000 (12:20 +0000)
perl/DXXml.pm
perl/DXXml/Ping.pm

index 280d19ced31691e35612880b3b48ee086e297470..b990410127167ac19f8339126fb215be371888df 100644 (file)
@@ -156,7 +156,6 @@ sub process
                                DXXml::Ping::add($main::me, $dxchan->call);
                                $dxchan->{nopings} -= 1;
                                $dxchan->{lastping} = $t;
-                               $dxchan->{lastping} += $dxchan->{pingint} / 2 unless @{$dxchan->{pingtime}};
                        }
                }
        }
index e02b61f85ca081a9fceb5fbf823c485d41621c2d..59c8ff3e6ee9067c0f16378b7660c82d820e08fd 100644 (file)
@@ -38,6 +38,9 @@ sub handle_input
                                                                           ot=>$self->{t}
                                                                          );
                        $dxchan->send($rep->toxml);
+                       if ($dxchan->{outgoing} && abs($dxchan->{lastping} - $main::systime) < 15) {
+                               $dxchan->{lastping} += $dxchan->{pingint} / 2; 
+                       }
                } else {
                        handle_ping_reply($dxchan, $self->{o}, $self->{ot}, $self->{oid});
                }