X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXMsg.pm;h=3ca756894a5ea2c3ce83602bdcef7504141acb7e;hb=95a03441d20680a914673d1b6bbf46c0d673ad4c;hp=428f87e958523dfd5adaf884aecd2da38b4d2540;hpb=4dfab83fae1e3a449d9057489362c876e7164136;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 428f87e9..3ca75689 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -19,7 +19,6 @@ use DXUtil; use DXChannel; use DXUser; use DXM; -use DXCluster; use DXProtVars; use DXProtout; use DXDebug; @@ -607,16 +606,22 @@ sub queue_msg my $dxchan; if ($ref->{private}) { next if $ref->{'read'}; # if it is read, it is stuck here - $clref = DXCluster->get_exact($ref->{to}); - unless ($clref) { # otherwise look for a homenode - my $uref = DXUser->get_current($ref->{to}); - my $hnode = $uref->homenode if $uref; - $clref = DXCluster->get_exact($hnode) if $hnode; - } - if ($clref && !grep { $clref->dxchan == $_ } DXCommandmode::get_all()) { - next if $clref->call eq $main::mycall; # i.e. it lives here + $clref = Route::get($ref->{to}); +# unless ($clref) { # otherwise look for a homenode +# my $uref = DXUser->get_current($ref->{to}); +# my $hnode = $uref->homenode if $uref; +# $clref = Route::Node::get($hnode) if $hnode; +# } + if ($clref) { $dxchan = $clref->dxchan; - $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal'; + if ($dxchan) { + if ($dxchan->is_node) { + next if $clref->call eq $main::mycall; # i.e. it lives here + $ref->start_msg($dxchan) if !get_busy($dxchan->call) && $dxchan->state eq 'normal'; + } + } else { + dbg('route', "Route: No dxchan for $ref->{to} " . ref($clref) ); + } } }