X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2Fcluster.pl;h=f62d2522bac7f707a6da0d88e8d75abe69a32b2b;hb=eed4648da2421ce33c3679fa2cd1519eed6c2e45;hp=58742e1952bd78b3e8618c8d51451c8c083a7f3f;hpb=28788cb9ae3fb39965886dbee36eec9266b1d904;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 58742e19..f62d2522 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -33,7 +33,7 @@ BEGIN { # try to create and lock a lockfile (this isn't atomic but # should do for now - $lockfn = "$root/perl/cluster.lck"; # lock file name + $lockfn = "$root/local/cluster.lck"; # lock file name if (-e $lockfn) { open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!"; my $pid = ; @@ -194,20 +194,15 @@ sub new_channel # create the channel if ($user->wantnp) { - if ($user->passphrase && $main::me->user->passphrase) { - $dxchan = QXProt->new($call, $conn, $user); - } else { - unless ($user->passphrase) { - Log('DXCommand', "$call using NP but has no passphrase"); - dbg("$call using NP but has no passphrase"); - } - unless ($main::me->user->passphrase) { - Log('DXCommand', "$main::mycall using NP but has no passphrase"); - dbg("$main::mycall using NP but has no passphrase"); - } - already_conn($conn, $call, "Need to exchange passphrases"); - return; + unless ($user->passphrase) { + Log('DXCommand', "$call using NP but has no passphrase"); + dbg("$call using NP but has no passphrase"); } + unless ($main::me->user->passphrase) { + Log('DXCommand', "$main::mycall using NP but has no passphrase"); + dbg("$main::mycall using NP but has no passphrase"); + } + $dxchan = QXProt->new($call, $conn, $user); } elsif ($user->is_node) { $dxchan = DXProt->new($call, $conn, $user); } elsif ($user->is_user) { @@ -244,7 +239,7 @@ sub rec sub clean_inqueue { my $dxchan = shift; - @inqueue = grep {$_ != $dxchan} @inqueue; + @inqueue = grep {$_->{dxchan} != $dxchan} @inqueue; } sub login @@ -406,7 +401,7 @@ dbg("DXSpider Version $version, build $build started"); # load Prefixes dbg("loading prefixes ..."); -my $r = Prefix::load(); +my $r = Prefix::init(); confess $r if $r; dbg(USDB::init()); @@ -556,7 +551,7 @@ for (;;) { DXUser::process(); DXDupe::process(); AGWMsg::process(); - + eval { Local::process(); # do any localised processing };