projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0c63d77
)
fix find
author
minima
<minima>
Tue, 8 Mar 2005 00:21:19 +0000
(
00:21
+0000)
committer
minima
<minima>
Tue, 8 Mar 2005 00:21:19 +0000
(
00:21
+0000)
perl/DXProt.pm
patch
|
blob
|
history
perl/Thingy/Ping.pm
patch
|
blob
|
history
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 78c39f1635639091235e15a9b78b79e9172b6485..7972bc3bf83f6ba7baa677ed29ebac82e7fd0fb1 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-1541,7
+1541,7
@@
sub handle_51
my $line = shift;
my $origin = shift;
my $line = shift;
my $origin = shift;
- if (eph_dup($line)) {
+ if (eph_dup($line
, 60
)) {
dbg("PCPROT: dup PC51 detected") if isdbg('chanerr');
return;
}
dbg("PCPROT: dup PC51 detected") if isdbg('chanerr');
return;
}
diff --git
a/perl/Thingy/Ping.pm
b/perl/Thingy/Ping.pm
index 39a4ee78d2a8036353b8c4b471d59b4a6abb6674..30359a422e7b6b89e22fef22c9a074d51a96a29c 100644
(file)
--- a/
perl/Thingy/Ping.pm
+++ b/
perl/Thingy/Ping.pm
@@
-99,7
+99,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 ||=
$thing->find
;
+ $ref ||=
find($thing->{origin}, $thing->{group})
;
if ($ref) {
my $t = tv_interval($ref->{t}, [ gettimeofday ]);
if (my $dxc = DXChannel::get($ref->{user} || $ref->{origin})) {
if ($ref) {
my $t = tv_interval($ref->{t}, [ gettimeofday ]);
if (my $dxc = DXChannel::get($ref->{user} || $ref->{origin})) {
@@
-179,10
+179,17
@@
sub forget
sub find
{
sub find
{
- my $call = shift;
+ my $to = shift;
+ my $from = shift;
+ my $user = shift;
+
foreach my $thing (values %ping) {
foreach my $thing (values %ping) {
- if (($thing->{user} || $thing->{origin}) eq $call) {
- return $thing;
+ if ($thing->{origin} eq $from && $thing->{group} eq $to) {
+ if ($user) {
+ return if $thing->{user} && $thing->{user} eq $user;
+ } else {
+ return $thing;
+ }
}
}
return undef;
}
}
return undef;