1. Crossed fingers, got rid of the instabilities caused by execing programs
[spider.git] / perl / DXMsg.pm
index 262a4155c92cd4deab28b8f832cec1ac8e519cf4..0fc327c4c543b6713c92ba456de5ac5cda3b4706 100644 (file)
@@ -5,7 +5,12 @@
 # Copyright (c) 1998 Dirk Koopman G1TLH
 #
 # $Id$
-# 
+#
+#
+# Notes for implementors:-
+#
+# PC28 field 11 is the RR required flag
+# PC28 field 12 is a VIA routing (ie it is a node call) 
 
 package DXMsg;
 
@@ -492,6 +497,11 @@ sub queue_msg
                if ($ref->{private}) {
                        if ($ref->{'read'} == 0) {
                                $clref = DXCluster->get_exact($ref->{to});
+                               unless ($clref) {             # otherwise look for a homenode
+                                       my $uref = DXUser->get($ref->{to});
+                                       my $hnode =  $uref->homenode if $uref;
+                                       $clref = DXCluster->get_exact($hnode) if $hnode;
+                               }
                                if ($clref && !grep { $clref->{dxchan} == $_ } DXCommandmode::get_all) {
                                        $dxchan = $clref->{dxchan};
                                        $ref->start_msg($dxchan) if $clref && !get_busy($dxchan->call) && $dxchan->state eq 'normal';