projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added a load of eph changes
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index dbe7faf8e7f63340b3ee4ef262e8ea7505ed6380..a317fce269776f8094df0e6f01db40274b0e1b58 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-35,7
+35,7
@@
use Route::Node;
use strict;
use vars qw($me $pc11_max_age $pc23_max_age
use strict;
use vars qw($me $pc11_max_age $pc23_max_age
- $last_hour $last10 %e
m
ph %pings %rcmds
+ $last_hour $last10 %eph %pings %rcmds
%nodehops $baddx $badspotter $badnode $censorpc
$allowzero $decode_dk0wcy $send_opernam @checklist);
%nodehops $baddx $badspotter $badnode $censorpc
$allowzero $decode_dk0wcy $send_opernam @checklist);
@@
-1072,7
+1072,7
@@
sub normal
# REBROADCAST!!!!
#
# REBROADCAST!!!!
#
- if (e
m
ph_dup($line)) {
+ if (eph_dup($line)) {
dbg('chan', "PCPROT: Ephemeral dup, dropped");
} else {
unless ($self->{isolate}) {
dbg('chan', "PCPROT: Ephemeral dup, dropped");
} else {
unless ($self->{isolate}) {
@@
-1116,9
+1116,9
@@
sub process
# every ten seconds
if ($t - $last10 >= 10) {
# every ten seconds
if ($t - $last10 >= 10) {
- # clean out e
m
phemera
+ # clean out ephemera
- e
m
ph_clean();
+ eph_clean();
$last10 = $t;
}
$last10 = $t;
}
@@
-1756,24
+1756,24
@@
sub route_pc21
broadcast_route($self, \&pc21, scalar @_, @_);
}
broadcast_route($self, \&pc21, scalar @_, @_);
}
-sub e
m
ph_dup
+sub eph_dup
{
my $s = shift;
# chop the end off
$s =~ s/\^H\d\d?\^?~?@//;
{
my $s = shift;
# chop the end off
$s =~ s/\^H\d\d?\^?~?@//;
- return 1 if exists $e
m
ph{$s};
- $e
m
ph{$s} = $main::systime;
+ return 1 if exists $eph{$s};
+ $eph{$s} = $main::systime;
return undef;
}
return undef;
}
-sub e
m
ph_clean
+sub eph_clean
{
my ($key, $val);
{
my ($key, $val);
- while (($key, $val) = each %e
m
ph) {
+ while (($key, $val) = each %eph) {
if ($main::systime - $val > 90) {
if ($main::systime - $val > 90) {
- delete $e
m
ph{$key};
+ delete $eph{$key};
}
}
}
}
}
}