projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some guff about running in compatibility mode if Storable is
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 66434a0e723bf9ca89d748b79da3402cffa2a712..2fe92625701aec7d7b57674acdc08adf3ca274ec 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-645,7
+645,9
@@
sub normal
# if there is a parent, proceed, otherwise if there is a latent PC19 in the PC19list,
# fix it up in the routing tables and issue it forth before the PC16
unless ($parent) {
# if there is a parent, proceed, otherwise if there is a latent PC19 in the PC19list,
# fix it up in the routing tables and issue it forth before the PC16
unless ($parent) {
- if (my $nl = $pc19list{$ncall}) {
+ my $nl = $pc19list{$ncall};
+
+ if ($nl && @field > 3) { # 3 because of the hop count!
# this is a new (remembered) node, now attach it to me if it isn't in filtered
# and we haven't disallowed it
# this is a new (remembered) node, now attach it to me if it isn't in filtered
# and we haven't disallowed it
@@
-659,8
+661,6
@@
sub normal
$user->node($ncall);
}
$user->node($ncall);
}
- delete $pc19list{$ncall}; # whatever happens - it goes
-
my $wantpc19 = $user->wantroutepc19;
if ($wantpc19 || !defined $wantpc19) {
my $new = Route->new($ncall); # throw away
my $wantpc19 = $user->wantroutepc19;
if ($wantpc19 || !defined $wantpc19) {
my $new = Route->new($ncall); # throw away
@@
-670,7
+670,7
@@
sub normal
$parent = Route::Node::get($_->[0]);
$dxchan = $parent->dxchan if $parent;
if ($dxchan && $dxchan ne $self) {
$parent = Route::Node::get($_->[0]);
$dxchan = $parent->dxchan if $parent;
if ($dxchan && $dxchan ne $self) {
- dbg("PCPROT: PC1
6
from $self->{call} trying to alter locally connected $ncall, ignored!") if isdbg('chanerr');
+ dbg("PCPROT: PC1
9
from $self->{call} trying to alter locally connected $ncall, ignored!") if isdbg('chanerr');
$parent = undef;
}
if ($parent) {
$parent = undef;
}
if ($parent) {
@@
-685,9
+685,14
@@
sub normal
# route the pc19 - this will cause 'stuttering PC19s' for a while
$self->route_pc19(@nrout) if @nrout ;
$parent = Route::Node::get($ncall);
# route the pc19 - this will cause 'stuttering PC19s' for a while
$self->route_pc19(@nrout) if @nrout ;
$parent = Route::Node::get($ncall);
+ unless ($parent) {
+ dbg("PCPROT: lost $ncall after sending PC19 for it?");
+ return;
+ }
} else {
return;
}
} else {
return;
}
+ delete $pc19list{$ncall};
}
} else {
dbg("PCPROT: Node $ncall not in config") if isdbg('chanerr');
}
} else {
dbg("PCPROT: Node $ncall not in config") if isdbg('chanerr');
@@
-728,11
+733,12
@@
sub normal
my $flags = Route::here($here)|Route::conf($conf);
if ($r) {
my $flags = Route::here($here)|Route::conf($conf);
if ($r) {
+ my $au = $r->addparent($parent);
if ($r->flags != $flags) {
$r->flags($flags);
if ($r->flags != $flags) {
$r->flags($flags);
-
push @rout,
$r;
+
$au =
$r;
}
}
-
$r->addparent($parent)
;
+
push @rout, $r if $au
;
} else {
push @rout, $parent->add_user($call, $flags);
}
} else {
push @rout, $parent->add_user($call, $flags);
}
@@
-910,13
+916,15
@@
sub normal
my $new = Route->new($call); # throw away
if ($self->in_filter_route($new)) {
my $ar = $parent->add($call, $ver, $flags);
my $new = Route->new($call); # throw away
if ($self->in_filter_route($new)) {
my $ar = $parent->add($call, $ver, $flags);
+ $user->wantroutepc19(1) unless defined $user->wantroutepc19;
push @rout, $ar if $ar;
} else {
next;
}
} else {
$pc19list{$call} = [] unless exists $pc19list{$call};
push @rout, $ar if $ar;
} else {
next;
}
} else {
$pc19list{$call} = [] unless exists $pc19list{$call};
- push @{$pc19list{$call}}, [$self->{call}, $ver, $flags];
+ my $nl = $pc19list{$call};
+ push @{$pc19list{$call}}, [$self->{call}, $ver, $flags] unless grep $_->[0] eq $self->{call}, @$nl;
}
}
}
}
@@
-1137,7
+1145,9
@@
sub normal
if ($pcno == 41) { # user info
my $call = $field[1];
if ($pcno == 41) { # user info
my $call = $field[1];
- if (eph_dup($line, $eph_info_restime)) {
+ my $l = $line;
+ $l =~ s/[\x00-\x20\x7f-\xff]+//g; # remove all funny characters and spaces for dup checking
+ if (eph_dup($l, $eph_info_restime)) {
dbg("PCPROT: dupe") if isdbg('chanerr');
return;
}
dbg("PCPROT: dupe") if isdbg('chanerr');
return;
}
@@
-1890,8
+1900,8
@@
sub disconnect
$self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op")));
}
$self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op")));
}
- # get rid of any PC16/17/19
/21s
- eph_del_regex("^PC
(?:1[679]|21).
*$call");
+ # get rid of any PC16/17/19
+ eph_del_regex("^PC
1[679]
*$call");
# do routing stuff, remove me from routing table
my $node = Route::Node::get($call);
# do routing stuff, remove me from routing table
my $node = Route::Node::get($call);
@@
-1902,7
+1912,7
@@
sub disconnect
# and all my ephemera as well
for (@rout) {
my $c = $_->call;
# and all my ephemera as well
for (@rout) {
my $c = $_->call;
- eph_del_regex("^PC
(?:1[679]|21)
.*$c");
+ eph_del_regex("^PC
1[679]
.*$c");
}
}
}
}
@@
-1916,7
+1926,7
@@
sub disconnect
}
# and the ephemera
}
# and the ephemera
- eph_del_regex("^PC
(?:1[679]|21)
.*$k");
+ eph_del_regex("^PC
1[679]
.*$k");
}
# unbusy and stop and outgoing mail
}
# unbusy and stop and outgoing mail