fix spurious 'new message' message for unread deleted personals
authorminima <minima>
Sun, 2 Dec 2001 17:06:37 +0000 (17:06 +0000)
committerminima <minima>
Sun, 2 Dec 2001 17:06:37 +0000 (17:06 +0000)
ignore remote passive link PC19s

Changes
perl/DXMsg.pm
perl/DXProt.pm

diff --git a/Changes b/Changes
index 986b2d04fe9c80d404bc00ce4f98ba4d37596d79..f15cb3c1ed99d125f3bcb6e57860d154c94a87d0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+02Dec01=======================================================================
+1. Fix spurious 'new message for you' messages if things are deleted but 
+unread.
+2. stop remote passive nodes (those with version numbers of 0000) from
+poluting the nodes table. Maybe this will make things slightly more stable.
 26Nov01=======================================================================
 1. Make changes to the installation manual to show making the client before
 actually trying to use it!  Thanks to oz1lqh.  Also add a line for SuSE
index 598dc7ea4cefd04771d0a19dc226e491c5d22fe9..d5a168e7ced7e20120d5e44af2493fdfcf07b1ce 100644 (file)
@@ -788,14 +788,15 @@ sub for_me
 {
        my $call = uc shift;
        my $ref;
+       my $count;
        
        foreach $ref (@msg) {
                # is it for me, private and unread? 
                if ($ref->{to} eq $call && $ref->{private}) {
-                       return 1 if !$ref->{'read'};
+                  $count++ unless $ref->{'read'} || $ref->{delete};
                }
        }
-       return 0;
+       return $count;
 }
 
 # start the message off on its travels with a PC28
index ee9c92f103410f54bfc3c78d20c764fc8085b71d..7a39bb3ac81a1e2d2ed0eb161fdd7c4c861f79c1 100644 (file)
@@ -208,7 +208,7 @@ sub new
        # add this node to the table, the values get filled in later
        my $pkg = shift;
        my $call = shift;
-       $main::routeroot->add($call, '0000', Route::here(1)) if $call ne $main::mycall;
+       $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall;
 
        return $self;
 }
@@ -743,7 +743,7 @@ sub normal
                                eph_del_regex("^PC(?:21\^$call|17\^[^\^]+\^$call)");
                                
                                # check for sane parameters
-                               $ver = 5000 if $ver eq '0000';
+#                              $ver = 5000 if $ver eq '0000';
                                next if $ver < 5000; # only works with version 5 software
                                next if length $call < 3; # min 3 letter callsigns
                                next if $call eq $main::mycall;