X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXMsg.pm;h=e27bf8022487cd12e2094ab3b4e6a0481a6b6e5c;hb=8eb1f5dcc25a223fa06c5e8b5bf7dbe97d42f6dd;hp=381c4233b003fd59eb03f3c6683d0cd1ea2d2d28;hpb=72457d1f7d98fd716d54cadb3b667d884cebc134;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 381c4233..e27bf802 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; @@ -102,7 +101,7 @@ sub alloc $self->{'read'} = shift; $self->{rrreq} = shift; $self->{gotit} = []; - $self->{lastt} = $main::systime; +# $self->{lastt} = $main::systime; $self->{lines} = []; $self->{private} = 1 if $bulltopriv && DXUser->get_current($self->{to}); @@ -607,16 +606,23 @@ 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 - $dxchan = $clref->dxchan; - $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal'; + $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) { + my $dxc = $clref->dxchan; + if ($dxc) { + if (grep {my $dxc=$clref->dxchan; $dxc && $dxc == $_ } DXCommandmode::get_all()) { + next if $clref->call eq $main::mycall; # i.e. it lives here + $dxchan = $clref->dxchan; + $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal'; + } + } else { + dbg('route', "Route: No dxchan for $ref->{to} " . ref($clref) ); + } } }