From: Dirk Koopman Date: Wed, 18 Jul 2007 16:04:46 +0000 (+0100) Subject: Make set/isolate work in BOTH directions X-Git-Tag: 1.55~95 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e228aafbb2f9eee36802d209f5d3bb3eef8e91fc;p=spider.git Make set/isolate work in BOTH directions Since the beginning I have had set/isolate be unidirection, so that I could see the far node's config, but he could not see mine. This is too confusing for yer modern sysop and I have now made it such that only the local configs are remembered, regardless of what is sent back to me. I.e. it is now symmetric and bidirectional. --- diff --git a/Changes b/Changes index 64a1dc1d..45c6ea75 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,10 @@ +18Jul07======================================================================= +1. Change the meaning of set/isolate. Set/isolate now works in both directions +in that an isolated node will only have its local config remembered and will +only be sent this nodes local config. This is exactly equivalent to both +ends setting set/isolate. If that is already the case then there should be +no noticeable change. Any extra that the far node sends, over and above its +local config will now be ignored. 17Jul07======================================================================= 1. remove dupefile on startup and on ending the node. Add clear/dupefile command to allow people to do it at runtime as well. diff --git a/perl/DXProt.pm b/perl/DXProt.pm index e4e0aa49..712b4785 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1238,6 +1238,12 @@ sub send_route for (; @_ && $no; $no--) { my $r = shift; + # don't send messages with $self's call in back to them + if ($r->call eq $self->{call}) { + dbg("PCPROT: trying to send $self->{call} back itself") if isdbg('chanerr'); + next; + } + if (!$self->{isolate} && $self->{routefilter}) { $filter = undef; if ($r) { @@ -1314,8 +1320,9 @@ sub broadcast_route_nopc9x next if $origin eq $dxchan->{call}; # don't route some from this call back again. next unless $dxchan->isa('DXProt'); next if $dxchan->{do_pc9x}; - next if ($generate == \&pc16 || $generate==\&pc17) && !$dxchan->user->wantsendpc16; - + if ($generate == \&pc16 || $generate==\&pc17) { + next unless $dxchan->user->wantsendpc16; + } $dxchan->send_route($origin, $generate, @_); } } diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index eacd9225..cd229c0f 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -405,6 +405,12 @@ sub handle_16 return; } + # isolate now means only accept stuff from this call only + if ($self->{isolate} && $ncall ne $self->{call}) { + dbg("PCPROT: $self->{call} isolated, $ncall ignored") if isdbg('chanerr'); + return; + } + my $parent = Route::Node::get($ncall); if ($parent) { @@ -503,6 +509,12 @@ sub handle_17 return; } + # isolate now means only accept stuff from this call only + if ($self->{isolate} && $ncall ne $self->{call}) { + dbg("PCPROT: $self->{call} isolated, $ncall ignored") if isdbg('chanerr'); + return; + } + RouteDB::delete($ncall, $self->{call}); my $uref = Route::User::get($ucall); @@ -684,6 +696,12 @@ sub handle_19 } } + # isolate now means only accept stuff from this call only + if ($self->{isolate} && $call ne $self->{call}) { + dbg("PCPROT: $self->{call} isolated, $call ignored") if isdbg('chanerr'); + next; + } + my $user = check_add_node($call); # if (eph_dup($genline)) { @@ -787,11 +805,16 @@ sub handle_21 eph_del_regex("^PC1[679].*$call"); # if I get a PC21 from the same callsign as self then ignore it - if ($call eq $self->call) { + if ($call eq $self->{call}) { dbg("PCPROT: self referencing PC21 from $self->{call}"); return; } + # for the above reason and also because of the check for PC21s coming + # in for self->call from outside being ignored further down + # we don't need any isolation code here, because we will never + # act on a PC21 with self->call in it. + RouteDB::delete($call, $self->{call}); my $parent = Route::Node::get($self->{call}); diff --git a/perl/Version.pm b/perl/Version.pm index db94a844..99bbd848 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.54'; $subversion = '0'; -$build = '119'; +$build = '120'; 1;