fix indirect routing to users 2 or more hops away
[spider.git] / perl / DXProt.pm
index a689088a3faf444cfbf07ab3855bbe3138af3f29..dfb571b280c3333d91cc8502090a0659040fab4a 100644 (file)
@@ -912,11 +912,14 @@ sub normal
                        $user->lastoper($main::systime);   # to cut down on excessive for/opers being generated
                        $user->put;
                        my $ref = Route::get($call);
-                       $self->route_pc41($ref, $field[2], $field[3], $field[4]) if $ref && !eph_dup($line);
+                       $self->route_pc41($ref, $call, $field[2], $field[3], $field[4]) if $ref && !eph_dup($line);
+                       return;
                }
+
                if ($pcno == 43) {
                        last SWITCH;
                }
+
                if ($pcno == 37 || $pcno == 44 || $pcno == 45 || $pcno == 46 || $pcno == 47 || $pcno == 48) {
                        DXDb::process($self, $line);
                        return;
@@ -1431,7 +1434,7 @@ sub send_local_config
        
        # get all the users connected on the above nodes and send them out
        foreach $n (@localnodes, @remotenodes) {
-               if ($r) {
+               if ($n) {
                        send_route($self, \&pc16, 1, $n, map {my $r = Route::User::get($_); $r ? ($r) : ()} $n->users);
                } else {
                        dbg('chan', "sent a null value");