fixes
authorminima <minima>
Sat, 9 Jun 2001 02:25:29 +0000 (02:25 +0000)
committerminima <minima>
Sat, 9 Jun 2001 02:25:29 +0000 (02:25 +0000)
Changes
perl/DXMsg.pm
perl/DXProt.pm
perl/Filter.pm

diff --git a/Changes b/Changes
index 26935f1a5be179d40c873512f9d97d26dc8f169e..c76ad6eb18183a7ee7fba362cf70ae7b7df7ebcd 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+09Jun01=======================================================================
+1. more fixes
+2. add set/debug filter so that you can see why your filters aren't working
+(for sysops only)
 08Jun01=======================================================================
 1. first cut with new routing code. Created NEW_ROUTE branch
 2. added acc/route and rej/route commands
index e27bf8022487cd12e2094ab3b4e6a0481a6b6e5c..a992f2ae2d5b1597d206bcf4b95f84fc03c2ba32 100644 (file)
@@ -615,9 +615,9 @@ sub queue_msg
                        if ($clref) {
                                my $dxc = $clref->dxchan;
                                if ($dxc) {
-                                       if (grep {my $dxc=$clref->dxchan; $dxc && $dxc == $_ } DXCommandmode::get_all()) {
+                                       if (!grep $dxc == $_, DXCommandmode::get_all()) {
                                                next if $clref->call eq $main::mycall;  # i.e. it lives here
-                                               $dxchan = $clref->dxchan;
+                                               $dxchan = $dxc;
                                                $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call)  && $dxchan->state eq 'normal';
                                        }
                                } else {
index 59e7ca07d7bf2ad89622a3c1096ae237d123cf65..da2c1c51ddc8c19586f9d96c9c48c3180d46e1a0 100644 (file)
@@ -1368,7 +1368,9 @@ sub send_local_config
        my @nodes;
        my @localnodes;
        my @remotenodes;
-               
+
+       dbg('trace', 'DXProt::send_local_config');
+       
        # send our nodes
        if ($self->{isolate}) {
                @localnodes = ( $main::routeroot );
index fbdb4f300fb579162fa34708504bac792f59a1a9..9b1b1d50196fdf84cf870185a2954f46f5aba3f3 100644 (file)
@@ -187,10 +187,15 @@ sub it
        my $filter;
        my @keys = sort $self->getfilkeys;
        my $key;
+       my $type = 'Dunno';
+       my $asc = '?';
+       
        my $r = @keys > 0 ? 0 : 1;
        foreach $key (@keys) {
                $filter = $self->{$key};
                if ($filter->{reject} && exists $filter->{reject}->{code}) {
+                       $type = 'reject';
+                       $asc = $filter->{reject}->{user};
                        if (&{$filter->{reject}->{code}}(\@_)) {
                                $r = 0;
                                last;
@@ -199,6 +204,8 @@ sub it
                        }               
                }
                if ($filter->{accept} && exists $filter->{accept}->{code}) {
+                       $type = 'accept';
+                       $asc = $filter->{accept}->{user};
                        if (&{$filter->{accept}->{code}}(\@_)) {
                                $r = 1;
                                last;
@@ -211,6 +218,13 @@ sub it
        # hops are done differently (simply) 
        my $hops = $self->{hops} if exists $self->{hops};
 
+       if (isdbg('filter')) {
+               my $args = join '\',\'', @_;
+               my $true = $r ? "OK" : "REJ";
+               my $sort = $self->{sort};
+               $hops ||= "none";
+               dbg('filter', "Filter: $type/$sort with $asc on '$args': $true hops: $hops");
+       }
        return ($r, $hops);
 }