projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
86c5d79
)
fix DXChannel::get
author
wr3d
<wr3d>
Sat, 12 Mar 2005 23:33:32 +0000
(23:33 +0000)
committer
wr3d
<wr3d>
Sat, 12 Mar 2005 23:33:32 +0000
(23:33 +0000)
Fix pinging (a bit)
perl/DXProt.pm
patch
|
blob
|
history
perl/Thingy/Ping.pm
patch
|
blob
|
history
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index d8dad2c3280ad54b6716dedf6e57aa968515ba59..2bfd66865c6eac1e2e6808e2bab7e2c423b4ebc0 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-972,6
+972,12
@@
sub handle_19
} else {
next;
}
} else {
next;
}
+ } else {
+ if ($r->version != $ver || $r->flags != $flags) {
+ $r->version($ver);
+ $r->flags($flags);
+ push @rout, $r;
+ }
}
} else {
}
} else {
@@
-1572,13
+1578,13
@@
sub process
# send a ping out on this channel
if ($dxchan->{pingint} && $t >= $dxchan->{pingint} + $dxchan->{lastping}) {
# send a ping out on this channel
if ($dxchan->{pingint} && $t >= $dxchan->{pingint} + $dxchan->{lastping}) {
-
if ($dxchan->{nopings} <= 0) {
-
$dxchan->disconnect;
-
} else {
+
#
if ($dxchan->{nopings} <= 0) {
+
#
$dxchan->disconnect;
+
#
} else {
addping($main::mycall, $dxchan->call);
$dxchan->{nopings} -= 1;
$dxchan->{lastping} = $t;
addping($main::mycall, $dxchan->call);
$dxchan->{nopings} -= 1;
$dxchan->{lastping} = $t;
-
}
+
#
}
}
}
}
}
diff --git
a/perl/Thingy/Ping.pm
b/perl/Thingy/Ping.pm
index 0d005e48eccf923d67ddd8b7f1f5922a76fea5e7..ec9ce73d1b5b6b208abaea184b2fe3925aecd04c 100644
(file)
--- a/
perl/Thingy/Ping.pm
+++ b/
perl/Thingy/Ping.pm
@@
-118,7
+118,7
@@
sub handle
# it's a reply, look in the ping list for this one
my $ref = $ping{$thing->{id}} if exists $thing->{id};
# it's a reply, look in the ping list for this one
my $ref = $ping{$thing->{id}} if exists $thing->{id};
- $ref
||= find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group}))
;
+ $ref
= find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group})) unless $ref
;
if ($ref) {
my $t = tv_interval($ref->{t}, [ gettimeofday ]);
my $tochan = DXChannel::get($ref->{touser} || $ref->{group});
if ($ref) {
my $t = tv_interval($ref->{t}, [ gettimeofday ]);
my $tochan = DXChannel::get($ref->{touser} || $ref->{group});