projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a pretty nearly working gtkconsole...
[spider.git]
/
perl
/
Investigate.pm
diff --git
a/perl/Investigate.pm
b/perl/Investigate.pm
index d59a57b5a1ba17f976d2fe47660366076510e400..811d6380386f5ede159e0aac4b7c4b3ba0f54f09 100644
(file)
--- a/
perl/Investigate.pm
+++ b/
perl/Investigate.pm
@@
-47,6
+47,7
@@
my $lastping = 0; # last ping done
pcxx => '0,Stored PCProt,parray',
);
pcxx => '0,Stored PCProt,parray',
);
+my %via = ();
sub new
{
sub new
{
@@
-87,13
+88,14
@@
sub handle_ping
my $self = shift;
dbg("Investigate: ping received for $self->{call} via $self->{via}") if isdbg('investigate');
if ($self->{state} eq 'waitping') {
my $self = shift;
dbg("Investigate: ping received for $self->{call} via $self->{via}") if isdbg('investigate');
if ($self->{state} eq 'waitping') {
+ $via{$self->{via}} = 0; # cue up next ping on this interface
delete $list{"$self->{via},$self->{call}"};
my $user = DXUser->get_current($self->{via});
if ($user) {
$user->set_believe($self->{call});
$user->put;
}
delete $list{"$self->{via},$self->{call}"};
my $user = DXUser->get_current($self->{via});
if ($user) {
$user->set_believe($self->{call});
$user->put;
}
- my $dxchan = DXChannel
->
get($self->{via});
+ my $dxchan = DXChannel
::
get($self->{via});
if ($dxchan) {
dbg("Investigate: sending PC19 for $self->{call}") if isdbg('investigate');
foreach my $pc (@{$self->{pcxx}}) {
if ($dxchan) {
dbg("Investigate: sending PC19 for $self->{call}") if isdbg('investigate');
foreach my $pc (@{$self->{pcxx}}) {
@@
-120,11
+122,13
@@
sub process
{
while (my ($k, $v) = each %list) {
if ($v->{state} eq 'start') {
{
while (my ($k, $v) = each %list) {
if ($v->{state} eq 'start') {
- if ($main::systime > $lastping+$pingint) {
- DXProt::addping($main::mycall, $v->{call}, $v->{via});
+ my $via = $via{$v->{via}} || 0;
+ if ($main::systime > $via+$pingint) {
+ DXXml::Ping::add($main::me, $v->{call}, $v->{via});
$v->{start} = $lastping = $main::systime;
dbg("Investigate: ping sent to $v->{call} via $v->{via}") if isdbg('investigate');
$v->chgstate('waitping');
$v->{start} = $lastping = $main::systime;
dbg("Investigate: ping sent to $v->{call} via $v->{via}") if isdbg('investigate');
$v->chgstate('waitping');
+ $via{$v->{via}} = $main::systime;
}
} elsif ($v->{state} eq 'waitping') {
if ($main::systime > $v->{start} + $maxpingwait) {
}
} elsif ($v->{state} eq 'waitping') {
if ($main::systime > $v->{start} + $maxpingwait) {