fix set/here and unset/here
[spider.git] / perl / DXProt.pm
index 3720008a03eb75770b9f7578251d54e20bc57317..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,11 @@ sub send_local_config
        
        # get all the users connected on the above nodes and send them out
        foreach $n (@localnodes, @remotenodes) {
-               send_route($self, \&pc16, 1, $n, map {my $r = Route::User::get($_); $r ? ($r) : ()} $n->users);
+               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");
+               }
        }
 }
 
@@ -1664,9 +1671,11 @@ sub disconnect
 
        # do routing stuff
        my $node = Route::Node::get($call);
-       my @rout = $node->del_nodes;    # at the next level
-
-       @rout = $node->del($main::routeroot) if $node;
+       my @rout;
+       if ($node) {
+               @rout = $node->del_nodes;    # at the next level
+               @rout = $node->del($main::routeroot);
+       }
        
        # unbusy and stop and outgoing mail
        my $mref = DXMsg::get_busy($call);
@@ -1718,8 +1727,12 @@ sub send_route
        if ($self->{routefilter}) {
                for (; @_ && $no; $no--) {
                        my $r = shift;
-                       ($filter, $hops) = $self->{routefilter}->it($self->{call}, $self->{dxcc}, $self->{itu}, $self->{cq}, $r->call, $r->dxcc, $r->itu, $r->cq);
-                       push @rin, $r if $filter;
+                       if ($r) {
+                               ($filter, $hops) = $self->{routefilter}->it($self->{call}, $self->{dxcc}, $self->{itu}, $self->{cq}, $r->call, $r->dxcc, $r->itu, $r->cq);
+                               push @rin, $r if $filter;
+                       } else {
+                               dbg('chan', "was sent a null value");
+                       }
                }
        }
        if (@rin) {